Updating role tables

Asked by Taras Klaskovsky

Now I am working on http://eden.sahanafoundation.org/ticket/794 ticket. I spend a lot of time, but cant understand where located code(or options) that executed every eden/admin/groups/1 "Add" click(I need figured it for checking the uniqueness of roles). I found that controller logic for this table located http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/controllers/admin.py#L463. I tried comment out
crud.settings.create_onaccept
but roles still adding for user.
Thank for help!

Question information

Language:
English Edit question
Status:
Solved
For:
Sahana-Eden Edit question
Assignee:
No assignee Edit question
Solved by:
Taras Klaskovsky
Solved:
Last query:
Last reply:
Revision history for this message
Pat Tressel (ptressel) said :
#1

Taras --

Two hints:

1) Look in the wiki at eden.sahanafoundation.org for descriptions of controller operation, to see where a duplicate check might go. Look for "onvalidation". But this may be a general problem, not specific to this one controller. Look at the database table definition in the admin model file -- is the role field marked "multiple"? Then the id numbers of the roles are packed in a string and stored in a single database field. Look for where "multiple" is handled.

2) Try using the Eclipse debugger -- set a breakpoint in the controller just before you submit the add form. Then single-step to follow what happens. Are you using the virtual machine development kit? If so then Eclipse is already set up.

Revision history for this message
Taras Klaskovsky (megaterik) said :
#2

Thank you!
I should had create crud.settings.create_onvalidation function :)