Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Nov 7, 2023
1 parent 8a35d10 commit 7e1a286
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/edrn.rdf/edrn/rdf/dmcccommitteerdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,23 @@ def generateGraph(self):
horribleMembers = members(verificationNum)
for row in splitDMCCRows(horribleMembers):
subjectURI = predicateURI = obj = None
gotChristos = False
for key, value in parseTokens(row):
if not value: continue
if key == 'committee_identifier':
subjectURI = URIRef(context.uriPrefix + value)
elif key == 'Registered_Person_Identifer':
if value == '2313':
gotChristos = True
obj = URIRef(context.personPrefix + value)
elif key == 'roleName':
if value not in _roleNamePredicates: continue
if value not in _roleNamePredicates:
_logger.warning('🤔 Unknown role "%s"; ignoring this member', value)
continue
predicateURI = URIRef(getattr(context, _roleNamePredicates[value]))
if gotChristos:
_logger.warning('🎅 Got Christos for subject %s, role %s, obj %s', subjectURI, predicateURI, obj)
gotChristos = False
if subjectURI and predicateURI and obj:
if obj == URIRef('http://edrn.nci.nih.gov/data/registered-person/2313'):
_logger.warning('🎅 Christos! %s, %s, %s', subjectURI, predicateURI, obj)
Expand Down
1 change: 1 addition & 0 deletions src/edrn.rdf/edrn/rdf/siterdfupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class SiteRDFUpdater(BrowserView):
'''A "view" that instructs all RDF sources to generate fresh RDF.'''
def render(self):
return self.index()

def __call__(self):
alsoProvides(self.request, IDisableCSRFProtection)
self.request.set('disable_border', True)
Expand Down

0 comments on commit 7e1a286

Please sign in to comment.