Skip to content

fix(release-group): Prevent empty IN array clause in SQL (backport #5398)#5399

Closed
mergify[bot] wants to merge 3 commits intomasterfrom
mergify/bp/master/pr-5398
Closed

fix(release-group): Prevent empty IN array clause in SQL (backport #5398)#5399
mergify[bot] wants to merge 3 commits intomasterfrom
mergify/bp/master/pr-5398

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 3, 2026

ref: https://support.frappe.io/helpdesk/tickets/61646

Resolves:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 116, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 51, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 84, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1512, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "apps/press/press/api/site.py", line 78, in wrapper
    return wrapped(*args, **kwargs)
  File "apps/press/press/api/bench.py", line 797, in deploy_and_update
    validate_app_hashes(apps)
  File "apps/press/press/api/bench.py", line 776, in validate_app_hashes
    frappe.qb.from_(YankedAppRelease)
  File "apps/frappe/frappe/query_builder/utils.py", line 79, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "apps/frappe/frappe/utils/sentry.py", line 36, in sql
    return real_sql(self, query, values or EmptyQueryValues, *args, **kwargs)
  File "apps/frappe/frappe/database/database.py", line 255, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
    res = self._query(mogrified_query)
  File "env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
    db.query(q)
  File "env/lib/python3.10/site-packages/MySQLdb/connections.py", line 280, in query
    _mysql.connection.query(self, query)
MySQLdb.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
```<hr>This is an automatic backport of pull request #5398 done by [Mergify](https://mergify.com).

@mergify mergify bot assigned regdocs Mar 3, 2026
@regdocs
Copy link
Member

regdocs commented Mar 3, 2026

Merged in #5400

@regdocs regdocs closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant