Guest User

Untitled

a guest
Jun 4th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. Upgrading inv.objectmodels
  2. ... upgrading Cisco | 7600 | RSP720-3CXL-GE
  3. ERROR:root:UNHANDLED EXCEPTION (2014-06-04 11:39:58.879127)
  4. Working directory: /opt/noc
  5. <class 'mongoengine.base.ValidationError'>
  6. Unable to dereference <class 'noc.inv.models.vendor.Vendor'>:5319b28a4a5e6844c85d54ae
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: /opt/noc/lib/nosql.py (Line: 105)
  10. Function: __get__
  11. 98 # Dereference DBRefs
  12. 99 if isinstance(value, ObjectId):
  13. 100 v = self.document_type.objects(id=value).first()
  14. 101 if v is not None:
  15. 102 instance._data[self.name] = v
  16. 103 else:
  17. 104 raise ValidationError("Unable to dereference %s:%s" % (
  18. 105 ==> self.document_type, value))
  19. 106 return super(PlainReferenceField, self).__get__(instance, owner)
  20. 107
  21. 108 def to_mongo(self, document):
  22. 109 if isinstance(document, Document):
  23. 110 # We need the id from the saved object to create the DBRef
  24. 111 id_ = document.id
  25. Variables:
  26. owner = <class 'noc.inv.models.objectmodel.ObjectModel'>
  27. instance = <ObjectModel: Cisco | 7600 | RSP720-3CXL-GE>
  28. self = <noc.lib.nosql.PlainReferenceField object at 0x32be4d0>
  29. value = ObjectId('5319b28a4a5e6844c85d54ae')
  30. v = None
  31. ------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment