Can somebody shed some light on the error, that one of our customers got on Ignition 7.9.21...?
validateInputImeRecepture is a custom method on the root container to verify, if the recipe name is valid:
def validateInputImeRecepture(self):
invalidMessageCompReceptura = self.getComponent("InvalidMessageReceptura")
novareceptura = self.getComponent("txtImeRecepture").text
if novareceptura != None:
exists = system.db.runPrepQuery("SELECT COUNT(*) FROM recipes WHERE ime_recepture = ?", [novareceptura])[0][0]
if len(novareceptura)==0 or exists:
invalidMessageCompReceptura.text = u"Že obstaja!"
invalidMessageCompReceptura.visible = True
self.IsValidImeRecepture = False
return
invalidMessageCompReceptura.visible = False
self.IsValidImeRecepture = True
line 12 is this line:
exists = system.db.runPrepQuery("SELECT COUNT(*) FROM recipes WHERE ime_recepture = ?", [novareceptura])[0][0]
It's interesting that this happens every now and then and not always...
Most of the time the call to this custom method works like it should.