Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
linkyndy committed Nov 21, 2015
2 parents c389022 + 42e9da4 commit 254cc34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remodel/registry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections import defaultdict

from .errors import AlreadyRegisteredError
import remodel.models


class ModelRegistry(object):
Expand All @@ -12,6 +11,8 @@ def __len__(self):
return len(self._data)

def register(self, name, cls):
import remodel.models

if name in self._data:
raise AlreadyRegisteredError('Model "%s" has been already registered' % name)
if not issubclass(cls, remodel.models.Model):
Expand Down

0 comments on commit 254cc34

Please sign in to comment.