sde1000 / quicktill

Figure out where all the money and stock went to
GNU General Public License v3.0
43 stars 8 forks source link

Consider removing current_user().dbuser #220

Open sde1000 opened 2 years ago

sde1000 commented 2 years ago

The dbuser attribute of current_user() will often be a detached ORM instance. It's currently refreshed in an ad-hoc way.

Consider removing this attribute and updating the rest of the code to use the userid attribute instead, getting a User object via the current database session every time it is needed.

sde1000 commented 2 years ago

(Prompted by 8f60116f941db26a5b91b06ec9eb4079f20194e5 which shouldn't have had to be fixed that way!)