Skip to content

Commit

Permalink
Modified /admin to accept any metadatafiled and not just the ones in the
Browse files Browse the repository at this point in the history
accepted terms list.
  • Loading branch information
bhavanaananda committed Jul 24, 2012
1 parent b3dc6be commit bc5431b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions rdfdatabank/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ def index(self):
g_root = config.get("granary.uri_root", "info:")
c.silo = ag.granary.get_rdf_silo(silo, uri_base="%s%s/datasets/" % (g_root, silo))
ag.granary._register_silos()
kw = {}
for term in accepted_params:
if term in params:
kw[term] = params[term]
kw['owners'] = ','.join(owners)
kw['administrators'] = ','.join(admins)
kw['managers'] = ','.join(managers)
kw['submitters'] = ','.join(submitters)
#kw = {}
#for term in accepted_params:
# if term in params:
# kw[term] = params[term]
params['owners'] = ','.join(owners)
params['administrators'] = ','.join(admins)
params['managers'] = ','.join(managers)
params['submitters'] = ','.join(submitters)
du = ag.granary.disk_usage_silo(silo)
kw['disk_usage'] = du
ag.granary.describe_silo(silo, **kw)
params['disk_usage'] = du
ag.granary.describe_silo(silo, **params)
ag.granary.sync()

# Add silo to database
Expand Down Expand Up @@ -306,8 +306,10 @@ def siloview(self, silo):

# Update silo info
updateMetadata = False
for term in accepted_params:
if term in params and not term in ['owners', 'administrators', 'managers', 'submitters'] and params[term]:
# for term in accepted_params:
# if term in params and not term in ['owners', 'administrators', 'managers', 'submitters'] and params[term]:
for term in params:
if not term in ['owners', 'administrators', 'managers', 'submitters'] and params[term]:
c.kw[term] = params[term]
updateMetadata = True
if new_owners or new_admins or new_managers or new_submitters or updateMetadata:
Expand Down

0 comments on commit bc5431b

Please sign in to comment.