Skip to content

Commit 8ea9a38

Browse files
author
Stephanie Reeder
committed
Merge pull request #254 from ODM2/flag_issue
fix frmFlagValues issue when no flags in db
2 parents defa27e + 0458926 commit 8ea9a38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

odmtools/gui/frmFlagValues.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ def __init__(self, parent, series_service, choices, isNew=False):
9797
self.series_service = series_service
9898

9999
self.qualchoices = choices
100-
if isNew:
100+
#len choices added in cases where ther are no flags in the database- still needs to be tested.
101+
#desired functionality is to automatically select creation of new flag
102+
if isNew or len(choices ==0):
101103
self.selectedValue = NEW
102104
wx.CallAfter(self.showNewFields)
103105
else:
106+
104107
self.selectedValue=choices.keys()[0]
105108

106109

0 commit comments

Comments
 (0)