From e893d6a4a5e1c455f6d14e89c53a5cbbef7c9116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Thu, 23 Jan 2025 20:13:14 +0100 Subject: [PATCH] Don't treat changemodel as a dictionary --- master/custom/schedulers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/master/custom/schedulers.py b/master/custom/schedulers.py index 572c9c39..93b6bac6 100644 --- a/master/custom/schedulers.py +++ b/master/custom/schedulers.py @@ -11,7 +11,7 @@ def __init__(self, *args, stable_builder_names, **kwargs): @defer.inlineCallbacks def addBuildsetForChanges(self, **kwargs): - log.msg("Preapring buildset for PR changes") + log.msg("Preparing buildset for PR changes") changeids = kwargs.get("changeids") if changeids is None or len(changeids) == 0: log.msg("No changeids found") @@ -22,10 +22,10 @@ def addBuildsetForChanges(self, **kwargs): # requests being made in quick succession. All these changeids will # have the same properties, so we can just pick the first one. changeid = changeids[0] - chdict = yield self.master.db.changes.getChange(changeid) + change = yield self.master.db.changes.getChange(changeid) - builder_filter = chdict["properties"].get("builderfilter", None) - event = chdict["properties"].get("event", None) + builder_filter = change.properties.get("builderfilter", None) + event = change.properties.get("event", None) if event: # looks like `("issue_comment", "Change")` for a comment event, _ = event