Skip to content

Commit

Permalink
Auto-set indie dev ribbon
Browse files Browse the repository at this point in the history
We're having a lot of issues with this ribbon getting unset, so we'll have to risk adding this code now. Also adds a quick and dirty "accoutrments" field to the admin form so you can see who is supposed to have Expo Hall or Backstage access
  • Loading branch information
kitsuta committed Jan 18, 2024
1 parent 2ab10f1 commit bd94c6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions magprime/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class Attendee:
group_name = Column(UnicodeText)
donate_badge_cost = Column(Boolean, default=False)

@presave_adjustment
def indie_ribbon(self):
if (self.group and self.group.guest and self.group.guest.group_type == c.MIVS
) or (self.group and "Indie Arcade -" in self.group.name) and c.MIVS not in self.ribbon_ints:
self.ribbon = add_opt(self.ribbon_ints, c.MIVS)

@property
def accoutrements(self):
# Converts ribbons to the new access system for check-in
Expand Down
11 changes: 11 additions & 0 deletions magprime/templates/forms/attendee/admin_badge_flags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends 'uber/templates/forms/attendee/admin_badge_flags.html' %}

{% block attendee_info %}
{{ super() }}
<div class="row g-sm-3">
<div class="col">
<div class="form-text">Accoutrements</div>
<div class="mb-4">{{ attendee.accoutrements }}</div>
</div>
</div>
{% endblock %}

0 comments on commit bd94c6c

Please sign in to comment.