Skip to content

Commit

Permalink
fix: database checking id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yejining committed Feb 17, 2020
1 parent a2966d4 commit 80410eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def get_id(self):
return self.lineEdit_dbid.displayText()

def is_existing_id(self):
dbconn = self.get_dbconn()
dbconn, table_game, table_info = self.get_dbconn()

condition = {'id': self.lineEdit_dbid.displayText()}
count = dbconn.count(table=dbconstant.TABLE_GAME, condition=condition)
count = dbconn.count(table=table_game, condition=condition)
dbconn.close()

return True if count > 0 else False
Expand Down

0 comments on commit 80410eb

Please sign in to comment.