Преглед на файлове

Add return to the wrapper for save

Save mistakenly removed the return function when a wrapper was added for it. This has created downstream issues, including preventing PUT requests through the API.
version-14
bcornwellmott преди 9 години
committed by GitHub
родител
ревизия
ea033f9dd5
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. +2
    -2
      frappe/model/document.py

+ 2
- 2
frappe/model/document.py Целия файл

@@ -239,7 +239,7 @@ class Document(BaseDocument):


def save(self, *args, **kwargs): def save(self, *args, **kwargs):
"""Wrapper for _save""" """Wrapper for _save"""
self._save(*args, **kwargs)
return self._save(*args, **kwargs)


def _save(self, ignore_permissions=None): def _save(self, ignore_permissions=None):
"""Save the current document in the database in the **DocType**'s table or """Save the current document in the database in the **DocType**'s table or
@@ -985,4 +985,4 @@ def execute_action(doctype, name, action, **kwargs):
doc.add_comment('Comment', doc.add_comment('Comment',
_('Action Failed') + '<pre><code>' + frappe.get_traceback() + '</pre></code>') _('Action Failed') + '<pre><code>' + frappe.get_traceback() + '</pre></code>')


doc.notify_update()
doc.notify_update()

Зареждане…
Отказ
Запис