Browse Source

Fix database error: null voice

Micrufun 2 years ago
parent
commit
99aea8e910
1 changed files with 3 additions and 0 deletions
  1. 3 0
      files/tasks.py

+ 3 - 0
files/tasks.py

@@ -831,6 +831,9 @@ def video_with_voices(user_or_session, friendly_token=None, voicesUid=None):
         media=media,
         media=media,
         action="getvideowithvoices",
         action="getvideowithvoices",
         remote_ip=remote_ip,
         remote_ip=remote_ip,
+        # Voice is not really needed for this action, but pass voice just to avoid this database error:
+        # ERROR:  null value in column "voice_id" of relation "actions_voiceaction" violates not-null constraint
+        voice=voice,
     )
     )
     va.save()
     va.save()