feat: Update SoundPlayed model to allow nullable user_id

This commit is contained in:
JSC
2025-07-09 14:00:55 +02:00
parent 7d224d1db7
commit 4f702d3302
2 changed files with 2 additions and 2 deletions

View File

@@ -120,6 +120,6 @@ def create_app():
"""Stop services when app context is torn down.""" """Stop services when app context is torn down."""
if exception: if exception:
scheduler_service.stop() scheduler_service.stop()
music_player_service.stop_vlc_instance() # music_player_service.stop_vlc_instance()
return app return app

View File

@@ -20,7 +20,7 @@ class SoundPlayed(db.Model):
user_id: Mapped[int] = mapped_column( user_id: Mapped[int] = mapped_column(
Integer, Integer,
ForeignKey("user.id"), ForeignKey("user.id"),
nullable=False, nullable=True,
) )
sound_id: Mapped[int] = mapped_column( sound_id: Mapped[int] = mapped_column(
Integer, Integer,