#504 Display event dependency in api/v2
Merged 4 years ago by lucarval. Opened 4 years ago by lucarval.
lucarval/freshmaker event-deps-api-v2  into  master

file modified
+2 -2
@@ -393,8 +393,6 @@ 

      def json(self):

          data = self._common_json()

          data['builds'] = [b.json() for b in self.builds]

-         data['depends_on_events'] = [event.id for event in self.event_dependencies]

-         data['depending_events'] = [event.id for event in self.depending_events]

          return data

  

      def json_min(self):
@@ -427,6 +425,8 @@ 

              "requested_rebuilds": (self.requested_rebuilds.split(" ")

                                     if self.requested_rebuilds else []),

              "requester_metadata": self.requester_metadata_json,

+             "depends_on_events": [event.id for event in self.event_dependencies],

+             "depending_events": [event.id for event in self.depending_events],

          }

  

      def find_dependent_events(self):

file modified
+2
@@ -205,6 +205,8 @@ 

              'url': 'http://localhost:5001/api/1/events/1',

              'requested_rebuilds': [],

              'requester_metadata': {},

+             'depending_events': [],

+             'depends_on_events': [],

          })