mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
- Request: added get_actions method
This commit is contained in:
parent
73ffb036f8
commit
8406cdd56d
@ -2425,6 +2425,15 @@ class Request:
|
||||
"""add a new action to the request"""
|
||||
self.actions.append(Action(type, **kwargs))
|
||||
|
||||
def get_actions(self, *types):
|
||||
"""
|
||||
get all actions with a specific type
|
||||
(if types is empty return all actions)
|
||||
"""
|
||||
if not types:
|
||||
return self.actions
|
||||
return [i for i in self.actions if i.type in types]
|
||||
|
||||
def get_creator(self):
|
||||
"""return the creator of the request"""
|
||||
if len(self.statehistory):
|
||||
|
Loading…
Reference in New Issue
Block a user