mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[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:
parent
3f44bb5c9e
commit
b1ce1e82e0
@ -575,18 +575,6 @@ class PullRequests(models.Model):
|
|||||||
for p in self
|
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
|
# missing link to other PRs
|
||||||
@api.depends('priority', 'state', 'squash', 'merge_method', 'batch_id.active', 'label')
|
@api.depends('priority', 'state', 'squash', 'merge_method', 'batch_id.active', 'label')
|
||||||
def _compute_is_blocked(self):
|
def _compute_is_blocked(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user