Add a metadata property for CollectionRequirement (#66370)

* Add a metadata property for CollectionRequirement so the _metadata attribute doesn't need to be accessed directly

* changelog
This commit is contained in:
Sloane Hertel 2020-01-15 12:40:26 -05:00 committed by Sam Doran
parent b9b2ddc580
commit 1cb634a3ab
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- CollectionRequirement - Add a metadata property to update and retrieve the _metadata attribute.

View file

@ -93,6 +93,11 @@ class CollectionRequirement:
def __unicode__(self):
return u"%s.%s" % (self.namespace, self.name)
@property
def metadata(self):
self._get_metadata()
return self._metadata
@property
def latest_version(self):
try: