[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-bugs] <bug>: tried to change address
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-bugs] <bug>: tried to change address |
Date: |
Sun, 30 Nov 2014 22:27:46 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Marc,
thanks for your report.
> user comment : tried to change address
>
> client version: 1.4.12
This ...
> 2014-11-25 11:22:29 ERROR gm.db
> (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1367): RW
> query failed: [DELETE FROM dem.lnk_person_org_address WHERE id_identity =
> 2241 AND id_address = 1654]
> 2014-11-25 11:22:29 ERROR gm.db
> (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1371): PG
> error code: 23503
> 2014-11-25 11:22:29 ERROR gm.db
> (/usr/share/gnumed/Gnumed/pycommon/gmPG2.py::run_rw_queries() #1373): PG
> error message: ERROR: update or delete on table "lnk_person_org_address"
> violates foreign key constraint "bill_fk_receiver_address_fkey" on table
> "bill"
> DETAIL: Key (id)=(2258) is still referenced from table "bill".
> 2014-11-25 11:22:29 ERROR gm.gui
> (/usr/share/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
> #216): enabling debug mode
> 2014-11-25 11:22:29 DEBUG gm.gui
> (/usr/share/gnumed/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
> #220): unhandled exception caught:
> Traceback (most recent call last):
> File "/usr/share/gnumed/Gnumed/wxpython/gmListWidgets.py", line 595, in
> _on_edit_button_pressed
> if not self.edit_callback(item):
> File "/usr/share/gnumed/Gnumed/wxpython/gmPersonContactWidgets.py", line
> 158, in _edit_address
> self.__identity.unlink_address(address = address)
> File "/usr/share/gnumed/Gnumed/business/gmPerson.py", line 1110, in
> unlink_address
> gmPG2.run_rw_queries(queries = [{'cmd': cmd, 'args': args}])
> File "/usr/share/gnumed/Gnumed/pycommon/gmPG2.py", line 1365, in
> run_rw_queries
> curs.execute(query['cmd'], args)
> File "/usr/lib/python2.7/dist-packages/psycopg2/extras.py", line 120, in
> execute
> return super(DictCursor, self).execute(query, vars)
> IntegrityError: update or delete on table "lnk_person_org_address" violates
> foreign key constraint "bill_fk_receiver_address_fkey" on table "bill"
> DETAIL: Key (id)=(2258) is still referenced from table "bill".
... is us having told PostgreSQL to stop us from shooting
ourselves in the foot.
When removing an address from a patient GNUmed forgot to
check whether that address is still in use with this patient
(as a billing address, in your case). I have now fixed this
for 1.4.14 which will be released within the next few days.
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346