Skip to content

Commit

Permalink
Changed default behaviour of DoesNotExists
Browse files Browse the repository at this point in the history
  • Loading branch information
neoecos committed Sep 19, 2013
1 parent 6b7e26f commit 59f1ede
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neomodel/index.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lucenequerybuilder import Q
from .exception import PropertyNotIndexed
from .exception import PropertyNotIndexed, DoesNotExist
from .properties import AliasProperty
import functools
from py2neo import neo4j
Expand Down Expand Up @@ -53,7 +53,8 @@ def get(self, query=None, **kwargs):
elif len(nodes) > 1:
raise Exception("Multiple nodes returned from query, expected one")
else:
raise self.node_class.DoesNotExist("Can't find node in index matching query")
#raise self.node_class.DoesNotExist("Can't find node in index matching query")
raise DoesNotExist("Can't find node in index matching query")

@property
def __index__(self):
Expand Down

0 comments on commit 59f1ede

Please sign in to comment.