[IMP] website: ir_http: correctly call super in auth_method_public

Calling super when it is possible it always a good practice. It ensures
to have a basic behavior that is the fallback when the behavior defined
in the inheritance does not apply. Previously the base behavior was done
directly in the inheritance without calling super. This commit improves
that and calls super like a pro.
This commit is contained in:
Thibault Delavallée
2017-07-17 17:07:19 +02:00
parent e66ba3ce1e
commit 0908cbd0e8
+2 -4
View File
@@ -62,10 +62,8 @@ class Http(models.AbstractModel):
website = env['website'].get_current_website()
if website:
request.uid = website.user_id.id
else:
request.uid = env.ref('base.public_user').id
else:
request.uid = request.session.uid
if not request.uid:
super(Http, cls)._auth_method_public()
bots = "bot|crawl|slurp|spider|curl|wget|facebookexternalhit".split("|")