|
|
@ -11,18 +11,18 @@ class ShowController():
|
|
|
|
self.Session = self.context['database']['session'] # convenience
|
|
|
|
self.Session = self.context['database']['session'] # convenience
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getShowDesciptor(self, showId):
|
|
|
|
def getShowDescriptor(self, showId):
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
s = self.Session()
|
|
|
|
s = self.Session()
|
|
|
|
q = s.query(Show).filter(Show.id == showId)
|
|
|
|
q = s.query(Show).filter(Show.id == showId)
|
|
|
|
|
|
|
|
|
|
|
|
if q.count():
|
|
|
|
if q.count():
|
|
|
|
show = q.first()
|
|
|
|
show: Show = q.first()
|
|
|
|
return show.getDesciptor()
|
|
|
|
return show.getDescriptor()
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as ex:
|
|
|
|
except Exception as ex:
|
|
|
|
raise click.ClickException(f"ShowController.getShowDesciptor(): {repr(ex)}")
|
|
|
|
raise click.ClickException(f"ShowController.getShowDescriptor(): {repr(ex)}")
|
|
|
|
finally:
|
|
|
|
finally:
|
|
|
|
s.close()
|
|
|
|
s.close()
|
|
|
|
|
|
|
|
|
|
|
|