Conversation
… aggregazione di campi testo vuoti. Invece che None torna la stringa vuota '' In questo branch creo la colonna "colonna_testo" in testata fattura e poi eseguo una aggragazione dalla tabella dei clienti Query di verifica e popolamento database sono tra gli script di upgrades
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
La query con selection(_aggregateRows=True) sembra fallire in caso di aggregazione di campi testo vuoti: invece che None torna la stringa vuota ''
In questo branch creo la colonna "colonna_testo" in testata fattura e poi eseguo una aggregazione dalla tabella dei clienti
Query di verifica e popolamento database sono tra gli script di upgrades
PR Type
enhancement, tests
Description
Added test scripts to verify aggregation behavior on empty text fields.
001_insertmario.pycreates a test client and related invoices.002_read_aggregate.pyruns queries to check aggregation results.Introduced new column
colonna_testotofatturatable.Demonstrated issue where aggregation returns '' instead of None for empty text.
Changes walkthrough 📝
fattura.py
Add `colonna_testo` column to `fattura` tablepackages/fatt/model/fattura.py
colonna_testo(text, size 20) tofatturatable.001_insertmario.py
Add script to insert test client and invoicespackages/fatt/lib/upgrades/001_insertmario.py
Mario Rossi Srl).colonna_testoas None.002_read_aggregate.py
Add script to test aggregation of empty text fieldspackages/fatt/lib/upgrades/002_read_aggregate.py
colonna_testo.