events: make permanent column for music enabled

pull/22/head
justcool393 2022-11-29 14:06:15 -06:00
parent 5db67fd8ae
commit b46e957e75
2 changed files with 3 additions and 2 deletions

View File

@ -7,9 +7,10 @@ class EventUser(Base):
__tablename__ = "event"
id = Column(Integer, ForeignKey("users.id"), primary_key=True)
user = relationship("User", primaryjoin="EventUser.id == User.id", lazy="joined")
event_music = Column(Boolean, default=True, nullable=False)
# start event specific columns
# end event specific columns
def __init__(self, *args, **kwargs):

View File

@ -1,4 +1,4 @@
{% if not (v and v.poor) and not (sub and sub.name == 'music') %}
{% if not (v and v.poor) and (v or v.event_music) and not (sub and sub.name == 'music') %}
{% if not song %}
{% set path = "assets/media/event/music" %}
{% set song = "/" + path + "/" + listdir('files/' + path)|random() + '?v=45' %}