mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 22:56:15 +01:00
core.Request: Add issues property that loads issues on demand
This commit is contained in:
parent
27c3159fdb
commit
770217bb8d
@ -2988,6 +2988,7 @@ class Request:
|
||||
self.actions = []
|
||||
self.statehistory = []
|
||||
self.reviews = []
|
||||
self._issues = None
|
||||
|
||||
def __eq__(self, other):
|
||||
return int(self.reqid) == int(other.reqid)
|
||||
@ -2999,6 +3000,12 @@ class Request:
|
||||
def id(self):
|
||||
return self.reqid
|
||||
|
||||
@property
|
||||
def issues(self):
|
||||
if self._issues is None:
|
||||
self._issues = get_request_issues(self.apiurl, self.id)
|
||||
return self._issues
|
||||
|
||||
def read(self, root):
|
||||
"""read in a request"""
|
||||
self._init_attributes()
|
||||
|
Loading…
Reference in New Issue
Block a user