CC-5015: Allow for cue_out points to be Null in DB

-prep for 2.4
This commit is contained in:
Martin Konecny 2013-03-08 14:57:20 -05:00
parent 30970598fe
commit 0075b27947
1 changed files with 11 additions and 1 deletions

View File

@ -372,7 +372,17 @@ class PypoPush(Thread):
first_link = chain[0]
self.modify_cue_point(first_link)
if float(first_link['cue_in']) >= float(first_link['cue_out']):
#ATM, we should never have an exception here. However in the future, it
#would be nice to allow cue_out to be None which would then allow us to
#fallback to the length of the track as the end point.
try:
end = first_link['cue_out']
except TypeError:
#cue_out is type None
end = first_link['length']
if float(first_link['cue_in']) >= float(end):
chain = chain [1:]
return chain