[REM] runbot_merge: str override on pull_request

Interaction of CacheMiss and BaseModel is fucked, leading to an
infinite loop when trying to provide useful __str__ on a model (by
accessing model fields).
This commit is contained in:
Xavier Morel 2020-01-23 10:08:55 +01:00
parent 3f44bb5c9e
commit b1ce1e82e0

View File

@ -575,18 +575,6 @@ class PullRequests(models.Model):
for p in self
]
def __str__(self):
if len(self) == 0:
separator = ''
elif len(self) == 1:
separator = ' '
else:
separator = 's '
return '<pull_request%s%s>' % (separator, ' '.join(
'{0.id} ({0.display_name})'.format(p)
for p in self
))
# missing link to other PRs
@api.depends('priority', 'state', 'squash', 'merge_method', 'batch_id.active', 'label')
def _compute_is_blocked(self):