summaryrefslogtreecommitdiff
path: root/addons/http_routing/models/ir_http.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-04-26 13:17:30 +0000
committerRaphael Collet <rco@odoo.com>2019-05-23 05:47:11 +0000
commite70abb63d49bec3cf1e1ca02f0557b7db9d64307 (patch)
tree1a437e7f29fcefd397448069727877dddb944814 /addons/http_routing/models/ir_http.py
parentd0bb596f1d51b72a6aa20d56eef3e65aefbd09b2 (diff)
[REF] addons: avoid using NewId
Diffstat (limited to 'addons/http_routing/models/ir_http.py')
-rw-r--r--addons/http_routing/models/ir_http.py2
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