fix: show progress in doc, if given (#22256)

If doc is given, show progress in doc only.
Else, show progress to the current user (in all tabs).
This commit is contained in:
Raffael Meyer 2023-08-31 08:03:48 +02:00 committed by GitHub
parent ddc4e4813a
commit b070c06f53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ def publish_progress(percent, title=None, doctype=None, docname=None, descriptio
publish_realtime(
"progress",
{"percent": percent, "title": title, "description": description},
user=frappe.session.user,
user=None if doctype and docname else frappe.session.user,
doctype=doctype,
docname=docname,
)