Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Call _convert_values in other methods than only create usefull … #30

Open
wants to merge 1 commit into
base: 10.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions smile_data_integration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def _convert_values(self, vals):


def call_kw_model(method, self, args, kwargs):
if method.__name__ == 'create' and args:
# FIX : Call _convert_values in other methods than only create usefull when smile_checklist is installed
# TODO : Add a better way to manage model method that need _convert_values
if method.__name__ in ['create', 'checklist_wrapper'] and args:
_convert_values(self, args[0])
return native_call_kw_model(method, self, args, kwargs)


def call_kw_multi(method, self, args, kwargs):
if args:
args = list(args)
Expand Down