Skip to content

Commit

Permalink
Don't treat changemodel as a dictionary (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv authored Jan 23, 2025
1 parent 1cff2e0 commit 34208ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions master/custom/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit 34208ed

Please sign in to comment.