gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] <bug>: trying to include as staff in 0.3


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] <bug>: trying to include as staff in 0.3
Date: Wed, 20 Aug 2008 16:23:33 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Rogerio,

thanks for the report.

> user comment  : trying to include as staff in 0.3 

Let's see.

This is the database stopping the client from doing
something we decided is not supported (another reason we use
PostgreSQL), namely using a given database account for
multiple GNUmed users:

> 2008-08-19 17:55:20  DEBUG     gm.gui 
> (/home/rogerio/Desktop/GNUmed-0.3-rc4/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
>  #45): unhandled exception caught:
> Traceback (most recent call last):
>   File 
> "/home/rogerio/Desktop/GNUmed-0.3-rc4/Gnumed/wxpython/gmStaffWidgets.py", 
> line 234, in _on_enlist_button_pressed
>     rows, idx = gmPG2.run_rw_queries(link_obj = conn, queries = queries, 
> end_tx = True)
>   File "/home/rogerio/Desktop/GNUmed-0.3-rc4/Gnumed/pycommon/gmPG2.py", line 
> 906, in run_rw_queries
>     curs.execute(query['cmd'], args)
>   File "/usr/lib/python2.5/site-packages/psycopg2/extras.py", line 88, in 
> execute
>     return _cursor.execute(self, query, vars, async)
> IntegrityError: duplicate key value violates unique constraint 
> "staff_db_user_key"

Now, it is the client's fault to not explicitely check for
that condition and signal the situation appropriately. I
have added that check to the CVS-to-be-0.3.

In short: there can only be one doctor associated with the
database account "rogluz".

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]