From 7fe53cbc6ddf1cf3b1a7cc2772c09f8a314486c2 Mon Sep 17 00:00:00 2001 From: myarjunar Date: Thu, 17 May 2018 14:43:32 +0700 Subject: [PATCH] fix error on editing bearing and distance --- PyQt4Dialogs.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PyQt4Dialogs.py b/PyQt4Dialogs.py index dfa7fdc..4573cc1 100755 --- a/PyQt4Dialogs.py +++ b/PyQt4Dialogs.py @@ -1620,7 +1620,7 @@ def is_beacon_reference_exist(self, beacon_name): return False if beacon_to == beacon_name: return False - if beacon_to == self.reference_beacon: + if beacon_to in self.auto["FROMBEACON"]: return True def is_end_linked(self, index): @@ -2181,13 +2181,12 @@ def execute_option(self, button): line_edit.setStyleSheet(self.colours["UNIQUE"]) valid = False break - if bool( - int(self.database.query( + if bool(int(self.database.query( self.query % ('beacon', "%s"), - (str(line_edit.text()),))[0][0])): - line_edit.setStyleSheet(self.colours["UNIQUE"]) - valid = False - break + (str(line_edit.text()),))[0][0])): + line_edit.setStyleSheet(self.colours["UNIQUE"]) + valid = False + break if not valid: QMessageBox.information( self,