mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 14:31:35 +01:00
fix: username encoding utf-8
This commit is contained in:
@@ -165,13 +165,12 @@ def get_dispatch():
|
|||||||
|
|
||||||
dispatch_objects = lines_timeout.filter(DispatchObject.method==method).all()
|
dispatch_objects = lines_timeout.filter(DispatchObject.method==method).all()
|
||||||
|
|
||||||
# get matchin "any" methods #
|
dispatch_objects_any = lines_timeout.filter(DispatchObject.method=="any").all()
|
||||||
if method == user_settings.get_highest_prio_method():
|
for d in dispatch_objects_any:
|
||||||
dispatch_objects_any = lines_timeout.filter(DispatchObject.method=="any").all()
|
user_str = str(d.usernames, "utf-8")
|
||||||
for d in dispatch_objects_any:
|
user_settings = db.session.query(UserSettings).filter(UserSettings.username==user_str).first()
|
||||||
user_settings = db.session.query(UserSettings).filter(UserSettings.username==d.username).first()
|
if user_settings and user_settings.get_highest_prio_method() == method:
|
||||||
if user_settings and user_settings.get_highest_prio_method() == method:
|
dispatch_objects += [d]
|
||||||
dispatch_objects += d
|
|
||||||
else:
|
else:
|
||||||
dispatch_objects = lines_timeout.all()
|
dispatch_objects = lines_timeout.all()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user