Skip to content

Commit

Permalink
version-tags retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Nov 26, 2024
1 parent 467e4e2 commit 5815635
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Products/zms/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,13 @@ def get_tags(self, context):
change_dt = obj_version.attr('change_dt')
change_uid = obj_version.attr('change_uid')
if change_dt and change_uid:
tags.append(
(standard.getLangFmtDate(version_item,change_dt,'eng','DATETIME_FMT')
,'r%i.%i.%i'%(obj_version.attr('master_version'), obj_version.attr('major_version'), obj_version.attr('minor_version'))
,'/'.join(version_item.getPhysicalPath())
))
dt = standard.getLangFmtDate(version_item,change_dt,'eng','DATETIME_FMT')
if not [1 for tag in tags if tag[0] == dt]:
tags.append(
(dt
,'r%i.%i.%i'%(obj_version.attr('master_version'), obj_version.attr('major_version'), obj_version.attr('minor_version'))
,'/'.join(version_item.getPhysicalPath())
))
tags = sorted(list(set(tags)),key=lambda x:x[0])
tags.reverse()
physical_path = '/'.join(context.getPhysicalPath())
Expand All @@ -309,8 +311,9 @@ def get_tags(self, context):
for i in range(len(tags)):
tag = list(tags[i])
if i == 0 and not tag[2] == physical_path:
dt = tag[0]
rtn.append(
[tag[0]
[dt
,'r*.*.*'
, physical_path
])
Expand Down

0 comments on commit 5815635

Please sign in to comment.