diff options
| author | rr- | 2016-11-07 19:28:54 +0100 |
|---|---|---|
| committer | rr- | 2016-11-07 19:28:54 +0100 |
| commit | c0d484689b54c31c2d139c6fc39ef348feb205ab (patch) | |
| tree | 006091f1be32a5286bc05b21253a49f85643d5d0 | |
| parent | b44b2aef7efc6eda38686a8e90cf82a7e0ff7204 (diff) | |
server: postpone circular dependency evaluation
Hopefully this improves importing with python 3.4
| -rw-r--r-- | server/szurubooru/func/favorites.py | 2 | ||||
| -rw-r--r-- | 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 e95582f..00952de 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 ed9c84d..a42961f 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: |