Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
jolheiser | fd3ffa6857 | |
jolheiser | e1b3319247 | |
jolheiser | e3b0194ebd |
4
gui.py
4
gui.py
|
@ -1,5 +1,7 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from django.db import connection
|
||||||
|
|
||||||
from django_coreprotect.models import CoWorld, GUIResult
|
from django_coreprotect.models import CoWorld, GUIResult
|
||||||
from django_coreprotect.utils import safe_int, checkbox, time_to_form
|
from django_coreprotect.utils import safe_int, checkbox, time_to_form
|
||||||
|
|
||||||
|
@ -110,6 +112,8 @@ def gui_results(form):
|
||||||
coords.append(" y BETWEEN {0} - {1} AND {0} + {1}".format(form.y, radius))
|
coords.append(" y BETWEEN {0} - {1} AND {0} + {1}".format(form.y, radius))
|
||||||
if form.z:
|
if form.z:
|
||||||
coords.append(" z BETWEEN {0} - {1} AND {0} + {1}".format(form.z, radius))
|
coords.append(" z BETWEEN {0} - {1} AND {0} + {1}".format(form.z, radius))
|
||||||
|
coords_clause = ""
|
||||||
|
if coords:
|
||||||
coords_clause = " AND ({})".format(" AND ".join(coords))
|
coords_clause = " AND ({})".format(" AND ".join(coords))
|
||||||
|
|
||||||
players = []
|
players = []
|
||||||
|
|
Loading…
Reference in New Issue