Skip to content

Commit

Permalink
Merge pull request #412 from cruxlog/patch-2
Browse files Browse the repository at this point in the history
Speed up Kotti startup
  • Loading branch information
disko committed Apr 8, 2015
2 parents ae8f005 + fba3440 commit 5e58d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kotti/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def populate():
lrm.locale_name = get_settings()['pyramid.default_locale_name']
localizer = lrm.localizer

if DBSession.query(Node).count() == 0:
if DBSession.query(Node.id).count() == 0:
localized_root_attrs = dict(
[(k, localizer.translate(v)) for k, v in _ROOT_ATTRS.iteritems()])
root = Document(**localized_root_attrs)
Expand Down

0 comments on commit 5e58d1e

Please sign in to comment.