Skip to content

Commit

Permalink
Cancel speculate empty version number
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Dec 15, 2022
1 parent b367538 commit b5234a3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions py/ztools/lib/nutdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ def consolidate_versiondb():
tid=str(row[id]).upper()
v_=str(row[ver])
if v_=="" and tid.endswith('800'):
v_=65536
continue
# v_=65536
elif v_=="":
v_=0
if tid.endswith('800'):
Expand All @@ -600,7 +601,8 @@ def consolidate_versiondb():
tid=tid[:-3]+'000'
for j in (data[i]).keys():
if j=="" and i.endswith('800'):
j=65536
continue
# j=65536
elif j=="":
j=0
try:
Expand All @@ -623,13 +625,16 @@ def consolidate_versiondb():
try:
j=entry['version']
except:
j=65536
continue
# j=65536
else:
try:
j=entry['version']
except:
j=0
try:
if j is None:
continue
if not tid in ver_txt_dict:
ver_txt_dict[tid]=j
else:
Expand All @@ -649,7 +654,8 @@ def consolidate_versiondb():
try:
j=version
except:
j=65536
continue
# j=65536
else:
try:
j=version
Expand All @@ -674,7 +680,7 @@ def consolidate_versiondb():
if not updid in newdict:
newdict[i]='0'
newdict[updid]=v_
ver_txt_dict=newdict
ver_txt_dict=newdict
for i in data:
tid=i.upper()
if i.endswith('000'):
Expand Down

0 comments on commit b5234a3

Please sign in to comment.