More protection against None
If the api fails, self.project and self.version are going to be None
and error when logging to sentry
@@ -282,8 +282,8 @@ class SyncRepositoryTaskStep(SyncRepositoryMixin):
extra={
'stack': True,
'tags': {
- 'project': self.project.slug,
- 'version': self.version.slug,
+ 'project': self.project.slug if self.project else '',
+ 'version': self.version.slug if self.version else '',
},
},
)
