Skip to content

Commit

Permalink
Improved formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TaaviE committed Nov 28, 2020
1 parent f9ae37d commit 472738d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utility_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
logger = getLogger()

shuffler = Random(Config.SHUFFLE_SEED)
christmasy_emojis = ["πŸŽ„", "πŸŽ…", "🀢", "🦌", "πŸͺ", "🌟", "❄️", "β˜ƒοΈ", "β›„", "🎁", "🎢", "πŸ•―οΈ", "πŸ”₯", "πŸ₯Ά", "🧣", "πŸ§₯",
"🌲", "🌁", "🌬️", "🎿", "πŸ”οΈ", "🌨️", "πŸ‚", "⛷️"]
christmasy_emojis = ["πŸŽ„", "πŸŽ…", "🀢", "🦌", "πŸͺ", "🌟",
"❄️", "β˜ƒοΈ", "β›„", "🎁", "🎢", "πŸ•―οΈ",
"πŸ”₯", "πŸ₯Ά", "🧣", "πŸ§₯", "🌲", "🌁",
"🌬️", "🎿", "πŸ”οΈ", "🌨️", "πŸ‚", "⛷️"
]
christmasy_emojis_len = len(christmasy_emojis)
shuffler.shuffle(christmasy_emojis) # Shuffle them based on each instance

Expand Down
2 changes: 2 additions & 0 deletions views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def shuffles():
"""
user_id = get_user_id()
all_shuffles = list(Shuffle.query.filter(Shuffle.giver == user_id).all())

active_shuffles: List[ShufflingEvent] = []
inactive_shuffles: List[ShufflingEvent] = []
for shuffle_pair in all_shuffles:
Expand All @@ -149,6 +150,7 @@ def shuffles():
shuffle_pair.group_name = Group.query.get(shuffle_event.group_id).name
shuffle_pair.giver_name = User.query.get(shuffle_pair.giver).first_name
shuffle_pair.getter_name = User.query.get(shuffle_pair.getter).first_name

if datetime.now() < shuffle_event.event_at:
active_shuffles.append(shuffle_pair)
else:
Expand Down

0 comments on commit 472738d

Please sign in to comment.