summaryrefslogtreecommitdiff
path: root/ql/orm/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ql/orm/utils.py')
-rw-r--r--ql/orm/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ql/orm/utils.py b/ql/orm/utils.py
new file mode 100644
index 0000000..e5d96e2
--- /dev/null
+++ b/ql/orm/utils.py
@@ -0,0 +1,7 @@
+from .models import Team
+
+
+def get_num_of_tables():
+ num_of_teams = Team.objects.count()
+ assert num_of_teams % 2 == 0
+ return int(num_of_teams / 2)