rename DB.createOrUpdateTourneyType to createTourneyType since TTs are static
This commit is contained in:
parent
2734dcb85a
commit
40088d6cf3
|
@ -1985,7 +1985,7 @@ class Database:
|
|||
print "***Error sending finish: "+err[2]+"("+str(err[1])+"): "+str(sys.exc_info()[1])
|
||||
# end def send_finish_msg():
|
||||
|
||||
def createOrUpdateTourneyType(self, hand):#note: this method is used on Hand and TourneySummary objects
|
||||
def createTourneyType(self, hand):#note: this method is used on Hand and TourneySummary objects
|
||||
tourneyTypeId = 1
|
||||
|
||||
# Check if Tourney exists, and if so retrieve TTypeId : in that case, check values of the ttype
|
||||
|
@ -2029,7 +2029,7 @@ class Database:
|
|||
)
|
||||
tourneyTypeId = self.get_last_insert_id(cursor)
|
||||
return tourneyTypeId
|
||||
#end def createOrUpdateTourneyType
|
||||
#end def createTourneyType
|
||||
|
||||
def createOrUpdateTourney(self, hand, source):#note: this method is used on Hand and TourneySummary objects
|
||||
cursor = self.get_cursor()
|
||||
|
|
|
@ -227,7 +227,7 @@ dealt whether they were seen in a 'dealt to' line
|
|||
self.dbid_gt = db.getGameTypeId(self.siteId, self.gametype)
|
||||
|
||||
if self.tourNo!=None:
|
||||
self.tourneyTypeId = db.createOrUpdateTourneyType(self)
|
||||
self.tourneyTypeId = db.createTourneyType(self)
|
||||
db.commit()
|
||||
self.tourneyId = db.createOrUpdateTourney(self, "HHC")
|
||||
db.commit()
|
||||
|
|
|
@ -202,7 +202,7 @@ class TourneySummary(object):
|
|||
self.dbid_pids=self.playerIds #TODO:rename this field in Hand so this silly renaming can be removed
|
||||
|
||||
#print "TS.self before starting insert",self
|
||||
self.tourneyTypeId = self.db.createOrUpdateTourneyType(self)
|
||||
self.tourneyTypeId = self.db.createTourneyType(self)
|
||||
self.db.commit()
|
||||
self.tourneyId = self.db.createOrUpdateTourney(self, "TS")
|
||||
self.db.commit()
|
||||
|
|
Loading…
Reference in New Issue
Block a user