Skip to content

Commit

Permalink
Merge pull request #22885 from frappe/version-13-hotfix
Browse files Browse the repository at this point in the history
chore: release v13
  • Loading branch information
ankush committed Oct 24, 2023
2 parents 62ba2be + 5ec32ba commit 899fe8a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions frappe/email/inbox.py
Expand Up @@ -3,6 +3,7 @@
import json

import frappe
from frappe.client import set_value


def get_email_accounts(user=None):
Expand Down Expand Up @@ -97,32 +98,32 @@ def mark_as_seen_unseen(name, action):


@frappe.whitelist()
def mark_as_closed_open(communication, status):
def mark_as_closed_open(communication: str, status: str):
"""Set status to open or close"""
frappe.db.set_value("Communication", communication, "status", status)
set_value("Communication", communication, "status", status)


@frappe.whitelist()
def move_email(communication, email_account):
def move_email(communication: str, email_account: str):
"""Move email to another email account."""
frappe.db.set_value("Communication", communication, "email_account", email_account)
set_value("Communication", communication, "email_account", email_account)


@frappe.whitelist()
def mark_as_trash(communication):
def mark_as_trash(communication: str):
"""Set email status to trash."""
frappe.db.set_value("Communication", communication, "email_status", "Trash")
set_value("Communication", communication, "email_status", "Trash")


@frappe.whitelist()
def mark_as_spam(communication, sender):
def mark_as_spam(communication: str, sender: str):
"""Set email status to spam."""
email_rule = frappe.db.get_value("Email Rule", {"email_id": sender})
if not email_rule:
frappe.get_doc({"doctype": "Email Rule", "email_id": sender, "is_spam": 1}).insert(
ignore_permissions=True
)
frappe.db.set_value("Communication", communication, "email_status", "Spam")
set_value("Communication", communication, "email_status", "Spam")


def link_communication_to_document(
Expand Down
2 changes: 1 addition & 1 deletion frappe/templates/print_formats/standard_macros.html
Expand Up @@ -109,7 +109,7 @@
<div style="padding: 10px 0px" {{ fieldmeta(df) }}>
{%- if df.fieldtype in ("Text", "Code", "Long Text") %}<label>{{ _(df.label) }}</label>{%- endif %}
{%- if df.fieldtype=="Code" %}
<pre class="value">{{ doc.get(df.fieldname) }}</pre>
<pre class="value">{{ doc.get(df.fieldname)|e }}</pre>
{% else -%}
{{ doc.get_formatted(df.fieldname, parent_doc or doc, translated=df.translatable) }}
{% endif -%}
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Expand Up @@ -4,14 +4,14 @@ bleach-allowlist~=1.0.3
bleach~=3.3.0
boto3~=1.17.53
braintree~=4.20.0
chardet~=4.0.0
chardet~=5.1.0
Click~=7.1.2
filelock~=3.8.0
colorama~=0.4.4
coverage==5.5
croniter~=1.0.11
cryptography~=3.4.7
dropbox~=11.7.0
dropbox~=11.36.0
email-reply-parser~=0.5.12
Faker~=8.1.0
future==0.18.2
Expand Down Expand Up @@ -62,7 +62,7 @@ rauth~=0.7.3
razorpay~=1.2.0
redis~=3.5.3
requests-oauthlib~=1.3.0
requests~=2.25.1
requests~=2.31.0
RestrictedPython~=5.4
rq~=1.8.0
rsa>=4.1 # not directly required, pinned by Snyk to avoid a vulnerability
Expand Down

0 comments on commit 899fe8a

Please sign in to comment.