Skip to content

Commit

Permalink
Fixed AttributeError in case of no match for PPN
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsgalore committed Feb 8, 2017
1 parent 9f6d8f9 commit b49111a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions iromlab/iromlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ def on_submit(self, event=None):
# Lookup catalog identifier
sruSearchString = '"PPN=' + str(catid) + '"'
response = sru.search(sruSearchString,"GGC")
noGGCRecords = response.sru.nr_of_records


if response == False:
noGGCRecords = 0
else:
noGGCRecords = response.sru.nr_of_records

if config.readyToStart == False:
msg = "You must first create a batch or open an existing batch"
tkMessageBox.showerror("Not ready", msg)
Expand Down

0 comments on commit b49111a

Please sign in to comment.