Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Upgrading inv.objectmodels
- ... upgrading Cisco | 7600 | RSP720-3CXL-GE
- ERROR:root:UNHANDLED EXCEPTION (2014-06-04 11:39:58.879127)
- Working directory: /opt/noc
- <class 'mongoengine.base.ValidationError'>
- Unable to dereference <class 'noc.inv.models.vendor.Vendor'>:5319b28a4a5e6844c85d54ae
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/nosql.py (Line: 105)
- Function: __get__
- 98 # Dereference DBRefs
- 99 if isinstance(value, ObjectId):
- 100 v = self.document_type.objects(id=value).first()
- 101 if v is not None:
- 102 instance._data[self.name] = v
- 103 else:
- 104 raise ValidationError("Unable to dereference %s:%s" % (
- 105 ==> self.document_type, value))
- 106 return super(PlainReferenceField, self).__get__(instance, owner)
- 107
- 108 def to_mongo(self, document):
- 109 if isinstance(document, Document):
- 110 # We need the id from the saved object to create the DBRef
- 111 id_ = document.id
- Variables:
- owner = <class 'noc.inv.models.objectmodel.ObjectModel'>
- instance = <ObjectModel: Cisco | 7600 | RSP720-3CXL-GE>
- self = <noc.lib.nosql.PlainReferenceField object at 0x32be4d0>
- value = ObjectId('5319b28a4a5e6844c85d54ae')
- v = None
- ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment