events: make permanent column for music enabled
parent
5db67fd8ae
commit
b46e957e75
|
@ -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):
|
||||
|
|
|
@ -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' %}
|
||||
|
|
Loading…
Reference in New Issue