Skip to content

Commit d2209ac

Browse files
committed
Fix viewing status for movies
1 parent 0a76d1b commit d2209ac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

grails-app/services/streama/ViewingStatusService.groovy

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ class ViewingStatusService {
2727
}.get()
2828

2929
if(!viewingStatus){
30-
viewingStatus = new ViewingStatus(tvShow: video?.show, user: currentUser, video: video, profile: params.profile)
30+
31+
TvShow show
32+
33+
if(video.hasProperty('show')){
34+
show = video.show
35+
}else{
36+
show = null
37+
}
38+
39+
viewingStatus = new ViewingStatus(tvShow: show, user: currentUser, video: video, profile: params.profile)
3140
}
3241

3342
viewingStatus.video = video

0 commit comments

Comments
 (0)