From 4cb6770c0203197409c2984b552ff3d92cf4a741 Mon Sep 17 00:00:00 2001 From: Pierre GIRAUD Date: Fri, 25 Nov 2016 11:33:17 +0100 Subject: [PATCH] Fix flake8 errors --- osmtm/models.py | 5 +++++ osmtm/tests/__init__.py | 1 + 2 files changed, 6 insertions(+) diff --git a/osmtm/models.py b/osmtm/models.py index 24bc1e23..47d1a023 100644 --- a/osmtm/models.py +++ b/osmtm/models.py @@ -104,6 +104,7 @@ class ST_SetSRID(GenericFunction): name = 'ST_SetSRID' type = Geometry + DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) Base = declarative_base() make_translatable() @@ -156,6 +157,7 @@ def as_dict(self): "is_project_manager": self.is_project_manager } + # task states READY = 0 INVALIDATED = 1 @@ -433,6 +435,7 @@ def area_after_insert(mapper, connection, target): values(centroid=ST_Centroid(target.geometry)) ) + project_allowed_users = Table( 'project_allowed_users', Base.metadata, @@ -449,6 +452,7 @@ class PriorityArea(Base): def __init__(self, geometry): self.geometry = geometry + project_priority_areas = Table( 'project_priority_areas', Base.metadata, @@ -714,4 +718,5 @@ def default(self, obj): # pragma: no cover return JSONEncoder.default(self, obj) + dumps = functools.partial(_dumps, cls=ExtendedJSONEncoder) diff --git a/osmtm/tests/__init__.py b/osmtm/tests/__init__.py index b3478269..6017a137 100644 --- a/osmtm/tests/__init__.py +++ b/osmtm/tests/__init__.py @@ -80,6 +80,7 @@ def populate_db(): transaction.commit() DBSession.remove() + populate_db()