Skip to content

Commit

Permalink
server_environment: Fix value assignation in compute from default
Browse files Browse the repository at this point in the history
Since previous commit adding support for ssl certificate auth,
field smtp_authentication in ir.mail_server, became a field managed by
environment, when mail_environment is installed.

This field has been defined using a default value relying on the
compute_default property allowing to define a compute function,
which matches the default value of the field.

However, as the function _compute_server_env_from_default was broken,
because it did not assign the computed value to the field, the
field was empty and connection was broken.
  • Loading branch information
grindtildeath committed Jun 24, 2024
1 parent 40c12a6 commit 464f3ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server_environment/models/server_env_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def _compute_server_env_from_config(self, field_name, options):

def _compute_server_env_from_default(self, field_name, options):
if options and options.get("compute_default"):
getattr(self, options["compute_default"])()
self[field_name] = getattr(self, options["compute_default"])()
else:
default_field = self._server_env_default_fieldname(field_name)
if default_field:
Expand Down

0 comments on commit 464f3ec

Please sign in to comment.