Skip to content

Commit

Permalink
Merge pull request #709 from streamaserver/HR/bugfix/MovieViewingStat…
Browse files Browse the repository at this point in the history
…usFix

Fix viewing status for movies
  • Loading branch information
HannahRy committed Dec 22, 2018
2 parents c182b01 + d2209ac commit 2ad1456
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion grails-app/services/streama/ViewingStatusService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ class ViewingStatusService {
}.get()

if(!viewingStatus){
viewingStatus = new ViewingStatus(tvShow: video?.show, user: currentUser, video: video, profile: params.profile)

TvShow show

if(video.hasProperty('show')){
show = video.show
}else{
show = null
}

viewingStatus = new ViewingStatus(tvShow: show, user: currentUser, video: video, profile: params.profile)
}

viewingStatus.video = video
Expand Down

0 comments on commit 2ad1456

Please sign in to comment.