Compare commits

..

3 Commits

Author SHA1 Message Date
jolheiser fd3ffa6857
Fix coords clause
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-02-12 09:38:47 -06:00
jolheiser e1b3319247
Fix connection import
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-02-12 09:28:56 -06:00
jolheiser e3b0194ebd Fix coords and re-add presets (#4)
Co-authored-by: Etzelia <etzelia@hotmail.com>
Reviewed-on: #4
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
2022-02-11 03:20:48 +00:00
1 changed files with 5 additions and 1 deletions

4
gui.py
View File

@ -1,5 +1,7 @@
from datetime import datetime
from django.db import connection
from django_coreprotect.models import CoWorld, GUIResult
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))
if form.z:
coords.append(" z BETWEEN {0} - {1} AND {0} + {1}".format(form.z, radius))
coords_clause = ""
if coords:
coords_clause = " AND ({})".format(" AND ".join(coords))
players = []