commit | aee7e45b8ff58b8fac6a60a66f46fd76994d74cd | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <teo@opennetworking.org> | Mon May 21 16:45:35 2018 -0700 |
committer | Matteo Scandolo <teo@opennetworking.org> | Mon May 21 16:45:35 2018 -0700 |
tree | 11d4011f5f3cf5fb0780d7d3cd719bf6bcb47004 | |
parent | 31361aeda045381d49fda285eab9f4bfa503f10e [diff] |
model_access get model should return IndexError as Django does Change-Id: I0bc8ae1443e6e7e4fdc2972d69b903db624c7937
diff --git a/lib/xos-genx/xosgenx/targets/mock_classes.xtarget b/lib/xos-genx/xosgenx/targets/mock_classes.xtarget index b6bb988..86deac2 100644 --- a/lib/xos-genx/xosgenx/targets/mock_classes.xtarget +++ b/lib/xos-genx/xosgenx/targets/mock_classes.xtarget
@@ -54,7 +54,7 @@ def get(self, **kwargs): objs = self.filter(**kwargs) if not objs: - raise Exception("No objects matching %s" % str(kwargs)) + raise IndexError("No objects matching %s" % str(kwargs)) return objs[0] class MockObjectStore(MockObjectList):