events: make permanent column for music enabled
parent
5db67fd8ae
commit
b46e957e75
|
@ -7,6 +7,7 @@ class EventUser(Base):
|
||||||
__tablename__ = "event"
|
__tablename__ = "event"
|
||||||
id = Column(Integer, ForeignKey("users.id"), primary_key=True)
|
id = Column(Integer, ForeignKey("users.id"), primary_key=True)
|
||||||
user = relationship("User", primaryjoin="EventUser.id == User.id", lazy="joined")
|
user = relationship("User", primaryjoin="EventUser.id == User.id", lazy="joined")
|
||||||
|
event_music = Column(Boolean, default=True, nullable=False)
|
||||||
|
|
||||||
# start event specific columns
|
# start event specific columns
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
{% if not song %}
|
||||||
{% set path = "assets/media/event/music" %}
|
{% set path = "assets/media/event/music" %}
|
||||||
{% set song = "/" + path + "/" + listdir('files/' + path)|random() + '?v=45' %}
|
{% set song = "/" + path + "/" + listdir('files/' + path)|random() + '?v=45' %}
|
||||||
|
|
Loading…
Reference in New Issue