Skip to content

Commit

Permalink
move create_obj out of try block
Browse files Browse the repository at this point in the history
  • Loading branch information
vegu committed May 20, 2024
1 parent d81229b commit 2d3e2b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peeringdb/_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def update_one(self, res, pk: int, depth=0):
)

row = self.fetcher.get(res.tag, pk, depth=0, force_fetch=True)
obj, _ = self.create_obj(row, res)
try:
obj, _ = self.create_obj(row, res)
self.copy_object(obj)
except self.backend.object_missing_error(self.backend.get_concrete(res)):
obj, _ = self.create_obj(row, res)
Expand Down

0 comments on commit 2d3e2b8

Please sign in to comment.