Closed dmth closed 7 years ago
When editing an organisation, it cannot be saved if something has been typed into the field sector_id and was deleted again.
ErrorLog:
Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/contactdb_api/serve.py", line 1006, in commit_pending_org_changes results.append((command, known_commands[command](org))) File "/usr/local/lib/python3.4/dist-packages/contactdb_api/serve.py", line 865, in _update_org _db_manipulate(operation_str, org, False) File "/usr/local/lib/python3.4/dist-packages/contactdb_api/serve.py", line 193, in _db_manipulate cur.execute(operation, parameters) File "/usr/local/lib/python3.4/dist-packages/psycopg2/extras.py", line 249, in execute return super(RealDictCursor, self).execute(query, vars) psycopg2.DataError: invalid input syntax for integer: "" LINE 5: ...NAMEOFORG', '', '4711'... ^
The json Object contains a sector_id': '' now but sector_id': None is expected.
sector_id': ''
sector_id': None
Workaround: scratch the pending Org and restart editing.
Fixed when using contactdb_api https://github.com/Intevation/intelmq-mailgen/commit/f991123ab61bcbed19c97df2a05b3aa3837668d9
When editing an organisation, it cannot be saved if something has been typed into the field sector_id and was deleted again.
ErrorLog:
The json Object contains a
sector_id': ''
now butsector_id': None
is expected.