diff options
| author | Raphael Collet <rco@odoo.com> | 2019-04-26 13:17:30 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-05-23 05:47:11 +0000 |
| commit | e70abb63d49bec3cf1e1ca02f0557b7db9d64307 (patch) | |
| tree | 1a437e7f29fcefd397448069727877dddb944814 /addons/http_routing | |
| parent | d0bb596f1d51b72a6aa20d56eef3e65aefbd09b2 (diff) | |
[REF] addons: avoid using NewId
Diffstat (limited to 'addons/http_routing')
| -rw-r--r-- | addons/http_routing/models/ir_http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/http_routing/models/ir_http.py b/addons/http_routing/models/ir_http.py index 12c81e9d620..0e2ecc1e33f 100644 --- a/addons/http_routing/models/ir_http.py +++ b/addons/http_routing/models/ir_http.py @@ -85,7 +85,7 @@ def slugify(s, max_length=None, path=False): def slug(value): if isinstance(value, models.BaseModel): - if isinstance(value.id, models.NewId): + if not value.id: raise ValueError("Cannot slug non-existent record %s" % value) # [(id, name)] = value.name_get() identifier, name = value.id, value.display_name |
