mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Prevent notify_users if importing or migrating (#6415)
* Prevent notify_users if importing or migrating * Comment out format line
This commit is contained in:
parent
4869d0dab8
commit
676bb02f6e
@ -299,6 +299,11 @@ def notify_responsible(
|
|||||||
content (NotificationBody, optional): _description_. Defaults to InvenTreeNotificationBodies.NewOrder.
|
content (NotificationBody, optional): _description_. Defaults to InvenTreeNotificationBodies.NewOrder.
|
||||||
exclude (User, optional): User instance that should be excluded. Defaults to None.
|
exclude (User, optional): User instance that should be excluded. Defaults to None.
|
||||||
"""
|
"""
|
||||||
|
import InvenTree.ready
|
||||||
|
|
||||||
|
if InvenTree.ready.isImportingData() or InvenTree.ready.isRunningMigrations():
|
||||||
|
return
|
||||||
|
|
||||||
notify_users(
|
notify_users(
|
||||||
[instance.responsible], instance, sender, content=content, exclude=exclude
|
[instance.responsible], instance, sender, content=content, exclude=exclude
|
||||||
)
|
)
|
||||||
|
@ -244,7 +244,7 @@ markdown_extensions:
|
|||||||
custom_fences:
|
custom_fences:
|
||||||
- name: mermaid
|
- name: mermaid
|
||||||
class: mermaid
|
class: mermaid
|
||||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
# format: !!python/name:pymdownx.superfences.fence_code_format
|
||||||
# - pymdownx.emoji:
|
# - pymdownx.emoji:
|
||||||
# emoji_index: !!python/name:materialx.emoji.twemoji
|
# emoji_index: !!python/name:materialx.emoji.twemoji
|
||||||
# emoji_generator: !!python/name:materialx.emoji.to_svg
|
# emoji_generator: !!python/name:materialx.emoji.to_svg
|
||||||
|
Loading…
Reference in New Issue
Block a user