Userfeedback #710

Edit Profile still doesn't work

Added by Thomas Mielke almost 3 years ago. Updated about 2 years ago.

Status:ErledigtStart date:
Priority:DringendDue date:
Assignee:Alexander Blum% Done:

100%

Category:-
Target version:Repertoire 1) Testing phase I

Description

Can't figure this out alone. @Tdb.transaction(readonly=False) is set in change_profile(). No clue yet how force tryton to perform a write transaction...


psycopg2.InternalError

InternalError: cannot execute UPDATE in a read-only transaction

Traceback (most recent call last)

File "/usr/local/lib/python2.7/dist-packages/pyramid_debugtoolbar/panels/performance.py", line 58, in resource_timer_handler

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] result = handler(request)

File "/usr/local/lib/python2.7/dist-packages/pyramid/tweens.py", line 41, in excview_tween

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] response = _error_handler(request, exc)

File "/usr/local/lib/python2.7/dist-packages/pyramid/tweens.py", line 16, in _error_handler

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] reraise(*exc_info)

File "/usr/local/lib/python2.7/dist-packages/pyramid/tweens.py", line 39, in excview_tween

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] response = handler(request)

File "/usr/local/lib/python2.7/dist-packages/pyramid/router.py", line 156, in handle_request

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] view_name

File "/usr/local/lib/python2.7/dist-packages/pyramid/view.py", line 642, in _call_view

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] response = view_callable(context, request)

File "/usr/local/lib/python2.7/dist-packages/pyramid/viewderivers.py", line 301, in secured_view

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] return view(context, request)

File "/usr/local/lib/python2.7/dist-packages/pyramid/viewderivers.py", line 439, in rendered_view

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] result = view(context, request)

File "/usr/local/lib/python2.7/dist-packages/pyramid/viewderivers.py", line 138, in _class_view

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] response = getattr(inst, attr)()

File "/ado/src/collecting_society.portal.repertoire/collecting_society_portal_repertoire/views/profile.py", line 37, in edit

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] return self.process_forms()

File "/ado/src/collecting_society.portal/collecting_society_portal/views/base.py", line 39, in process_forms

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] _response = controller.process(self.context, self.request)

File "/ado/src/collecting_society.portal/collecting_society_portal/views/forms/base.py", line 97, in process

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] return self.controller()

File "/ado/src/collecting_society.portal.repertoire/collecting_society_portal_repertoire/views/forms/edit_profile.py", line 33, in controller

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] self.change_profile()

File "/ado/src/collecting_society.portal/collecting_society_portal/models/base.py", line 197, in wrapper

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] result = func(*args, **kwargs)

File "/ado/src/collecting_society.portal.repertoire/collecting_society_portal_repertoire/views/forms/edit_profile.py", line 76, in change_profile

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] web_user.party.save()

File "/ado/src/trytond/trytond/model/modelstorage.py", line 1420, in save

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] self.write([self], save_values)

File "/ado/src/trytond/trytond/model/modelsql.py", line 801, in write

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] where=red_sql))

File "/ado/src/trytond/trytond/backend/postgresql/database.py", line 315, in execute

 [Display the sourcecode for this frame]  [Open an interactive python shell in this frame] return self.cursor.execute(sql, params)

InternalError: cannot execute UPDATE in a read-only transaction


Related issues

Related to collecting_society - Userfeedback #802: Profil: Email Änderungsmail kommt nicht an Neu

History

#1 Updated by Alexander Blum almost 3 years ago

  • Status changed from Neu to Feedback
  • Assignee set to Thomas Mielke

Thomas Mielke wrote:

No clue yet how force tryton to perform a write transaction...

The resource has to open a write connection in the beginning, see for example here. In the end, the resource needs just an attribute 'readonly' set to False (only for the edit view). The _write list is just for convenience, see here and here.

Hint: If you need feedback, assign the ticket to me and and the status to feedback. My mail client will highlight those issues.

#2 Updated by Alexander Blum almost 3 years ago

  • Status changed from Feedback to Erledigt
  • Assignee changed from Thomas Mielke to Alexander Blum
  • % Done changed from 0 to 100

#3 Updated by Thomas Mielke almost 3 years ago

#4 Updated by Alexander Blum about 2 years ago

  • Target version changed from 1) Testing phase I to Repertoire 1) Testing phase I

#5 Updated by Alexander Blum about 2 years ago

  • Project changed from repertoire to collecting_society

Also available in: Atom PDF