In data mercoledì 11 dicembre 2013 12:09:25, Ferran Jorba ha scritto:
> Hi Samuele,
> 
> > >> * 2013-12-10 13:15:20 -> KeyError: 'categ'
> > >> (access_control_admin.py:1522:acc_find_possible_actions)
> > > 
> > > the categ additional param was introduced in:
> > > [...]
> 
> I've tried to debut it myself, but I cannot understand the origin of
> the error.  I've patched access_control_admin.py (see below) and I get this
> debug.log message.  Does it help?
> 
> $ cat /tmp/debug.log
> 
> keywords:
> ['categ', 'doctype']
> 
> res2:
> [[1, 'act', 'SBI'], [1, 'doctype', 'ARTCIE']]
> 
> a:
> 1
> 
> arglistids:
> {1: {'doctype': ['ARTCIE']}}
> 
> arglistids[a]:
> {'doctype': ['ARTCIE']}

Mmmh. what do you have if you type:

$ echo "select a.*, b.* from accROLE_accACTION_accARGUMENT as a join accACTION 
on id_accACTION=accACTION.id join accARGUMENT as b on id_accARGUMENT=b.id where 
name='submit'" | /opt/invenio/bin/dbexec

For example on vanilla Invenio you would obtain:

id_accROLE      id_accACTION    id_accARGUMENT  argumentlistid  id      keyword 
value
19      33      8       1       8       categ   *
19      33      11      1       11      doctype DEMOJRN
19      33      12      1       12      act     SBI
19      33      8       2       8       categ   *
19      33      11      2       11      doctype DEMOJRN
19      33      13      2       13      act     MBI
18      33      19      1       19      categ   ARTICLE
18      33      20      1       20      doctype DEMOART
18      33      12      1       12      act     SBI

Which shows that to every id_accROLE+argumentlistid there is a triplet.

Cheers,
        Sam
-- 
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>
INSPIRE Service Manager ** <http://inspirehep.net/>
Interim SCOAP3 Repository Manager ** <http://scoap3repo.cern.ch/>

Reply via email to