From c0d484689b54c31c2d139c6fc39ef348feb205ab Mon Sep 17 00:00:00 2001 From: rr- Date: Mon, 7 Nov 2016 19:28:54 +0100 Subject: [PATCH] server: postpone circular dependency evaluation Hopefully this improves importing with python 3.4 --- server/szurubooru/func/favorites.py | 2 +- server/szurubooru/func/scores.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/szurubooru/func/favorites.py b/server/szurubooru/func/favorites.py index e95582fe..00952de7 100644 --- a/server/szurubooru/func/favorites.py +++ b/server/szurubooru/func/favorites.py @@ -1,6 +1,5 @@ import datetime from szurubooru import db, errors -from szurubooru.func import scores class InvalidFavoriteTargetError(errors.ValidationError): @@ -36,6 +35,7 @@ def unset_favorite(entity, user): def set_favorite(entity, user): + from szurubooru.func import scores assert entity assert user try: diff --git a/server/szurubooru/func/scores.py b/server/szurubooru/func/scores.py index ed9c84db..a42961f2 100644 --- a/server/szurubooru/func/scores.py +++ b/server/szurubooru/func/scores.py @@ -1,6 +1,5 @@ import datetime from szurubooru import db, errors -from szurubooru.func import favorites class InvalidScoreTargetError(errors.ValidationError): @@ -47,6 +46,7 @@ def get_score(entity, user): def set_score(entity, user, score): + from szurubooru.func import favorites assert entity assert user if not score: