Skip to content

Commit

Permalink
See CHANGELOG tag-0.18-20210905
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnavarro committed Sep 5, 2021
1 parent 89532f4 commit b0af5ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tag-0.18-20210905 JP
- Switch to .objects.get_or_create for Drupal 3.0
6 changes: 3 additions & 3 deletions bin/route_globus_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def Update_REL(self, myURN, newRELATIONS):
relationType = newRELATIONS[relatedID]
relationHASH = md5(':'.join([relatedID, relationType]).encode('UTF-8')).hexdigest()
relationID = ':'.join([myURN, relationHASH])
relation = ResourceV3Relation(
relation, created = ResourceV3Relation.objects.get_or_create(
ID = relationID,
FirstResourceID = myURN,
SecondResourceID = relatedID,
Expand Down Expand Up @@ -474,7 +474,7 @@ def Write_Globus_Collections(self, content, contype, config):
if item.get('Name'):
self.GLOBUS_NAME_URNMAP[item['Name']] = myGLOBALURN
try:
local = ResourceV3Local(
local, created = ResourceV3Local.objects.get_or_create(
ID = myGLOBALURN,
CreationTime = datetime.now(timezone.utc),
Validity = self.DefaultValidity,
Expand All @@ -496,7 +496,7 @@ def Write_Globus_Collections(self, content, contype, config):
try:
ShortDescription = 'The {} Science Gateway Project'.format(item['Name'])
Description = Format_Description(item.get('Description'))
resource = ResourceV3(
resource, created = ResourceV3.objects.get_or_create(
ID = myGLOBALURN,
Affiliation = self.Affiliation,
LocalID = item['id'],
Expand Down

0 comments on commit b0af5ca

Please sign in to comment.