ff
This commit is contained in:
@@ -53,7 +53,7 @@ class PatternDeleteScreen(Screen):
|
||||
|
||||
self.pattern_id = patternId
|
||||
self.pattern_obj = self.__pc.getPatternDescriptor(patternId) if patternId is not None else {}
|
||||
self.show_obj = self.__sc.getShowDesciptor(showId) if showId is not None else {}
|
||||
self.show_obj = self.__sc.getShowDescriptor(showId) if showId is not None else {}
|
||||
|
||||
|
||||
def on_mount(self):
|
||||
|
||||
@@ -92,7 +92,7 @@ class PatternDetailsScreen(Screen):
|
||||
|
||||
self.__pattern : Pattern = self.__pc.getPattern(patternId) if patternId is not None else None
|
||||
|
||||
self.show_obj = self.__sc.getShowDesciptor(showId) if showId is not None else {}
|
||||
self.show_obj = self.__sc.getShowDescriptor(showId) if showId is not None else {}
|
||||
|
||||
|
||||
#TODO: per controller
|
||||
|
||||
@@ -11,18 +11,18 @@ class ShowController():
|
||||
self.Session = self.context['database']['session'] # convenience
|
||||
|
||||
|
||||
def getShowDesciptor(self, showId):
|
||||
def getShowDescriptor(self, showId):
|
||||
|
||||
try:
|
||||
s = self.Session()
|
||||
q = s.query(Show).filter(Show.id == showId)
|
||||
|
||||
if q.count():
|
||||
show = q.first()
|
||||
return show.getDesciptor()
|
||||
show: Show = q.first()
|
||||
return show.getDescriptor()
|
||||
|
||||
except Exception as ex:
|
||||
raise click.ClickException(f"ShowController.getShowDesciptor(): {repr(ex)}")
|
||||
raise click.ClickException(f"ShowController.getShowDescriptor(): {repr(ex)}")
|
||||
finally:
|
||||
s.close()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ShowDeleteScreen(Screen):
|
||||
self.Session = self.context['database']['session'] # convenience
|
||||
|
||||
self.__sc = ShowController(context = self.context)
|
||||
self.show_obj = self.__sc.getShowDesciptor(showId) if showId is not None else {}
|
||||
self.show_obj = self.__sc.getShowDescriptor(showId) if showId is not None else {}
|
||||
|
||||
|
||||
def on_mount(self):
|
||||
|
||||
@@ -79,7 +79,7 @@ class ShowDetailsScreen(Screen):
|
||||
self.__sc = ShowController(context = self.context)
|
||||
self.__pc = PatternController(context = self.context)
|
||||
|
||||
self.show_obj = self.__sc.getShowDesciptor(showId) if showId is not None else {}
|
||||
self.show_obj = self.__sc.getShowDescriptor(showId) if showId is not None else {}
|
||||
|
||||
|
||||
def loadPatterns(self, show_id : int):
|
||||
|
||||
Reference in New Issue
Block a user