-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from sennetconsortium/libpitt/263-superclass
Review entity-api superclass behavior, add support for registration o…
- Loading branch information
Showing
4 changed files
with
14 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
from atlas_consortia_commons.ubkg.ubkg_sdk import UbkgSDK | ||
from flask import current_app | ||
|
||
|
||
# Custom accessors etc. can be added to the Ontology class | ||
class Ontology(UbkgSDK): | ||
pass | ||
@staticmethod | ||
def modify_entities_cache(): | ||
cache = current_app.ubkg.get_cache() | ||
entities = current_app.ubkg.entities | ||
key = f"VALUESET_{entities}" | ||
if key in cache: | ||
for e in cache[key]: | ||
if e['term'] == 'Publication Entity': | ||
e['term'] = 'Publication' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters