Skip to content

Commit

Permalink
Fix ModuleMarker bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SuprDewd committed Jan 13, 2016
1 parent f1df3de commit f37b096
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# from flask.ext.sqlalchemy import SQLAlchemy
# db = SQLAlchemy()
import datetime
import sqlalchemy
from sqlalchemy import create_engine, Column, Integer, String, Text, DateTime, ForeignKey, Boolean
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
Expand Down Expand Up @@ -85,4 +86,6 @@ def register_base(db):
db.Model = Base
for c in Base._decl_class_registry.values():
# Add the query class to each of the models.
if type(c) is sqlalchemy.ext.declarative.clsregistry._ModuleMarker:
continue
c.query = db.session.query_property()

0 comments on commit f37b096

Please sign in to comment.