Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: syntax error at or near "JOIN" #10

Open
1 task done
ksagar8848 opened this issue Dec 23, 2024 · 0 comments · Fixed by #20
Open
1 task done

SyntaxError: syntax error at or near "JOIN" #10

ksagar8848 opened this issue Dec 23, 2024 · 0 comments · Fixed by #20
Assignees
Labels
bug Something isn't working GST Settings

Comments

@ksagar8848
Copy link
Collaborator

Information about bug

test_validate_e_invoice_applicable_companies_without_applicable_from (india_compliance.gst_india.doctype.gst_settings.test_gst_settings.TestGSTSettings.test_validate_e_invoice_applicable_companies_without_applicable_from)

Version

Frappe-v-15
ErpNext-v-15

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 80, in inner
    with self._recreate_cm():
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/tests/utils.py", line 320, in change_settings
    settings.save(ignore_permissions=True)
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 342, in save
    return self._save(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 378, in _save
    self.run_before_save_methods()
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 1103, in run_before_save_methods
    self.run_method("validate")
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 974, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 1334, in composer
    return composed(self, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 1316, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/model/document.py", line 971, in fn
    return method_object(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/india_compliance/india_compliance/gst_india/doctype/gst_settings/gst_settings.py", line 48, in validate
    self.update_e_invoice_status()
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/india_compliance/india_compliance/gst_india/doctype/gst_settings/gst_settings.py", line 71, in update_e_invoice_status
    frappe.enqueue(update_e_invoice_status, queue="long", timeout=6000)
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/__init__.py", line 2263, in enqueue
    return frappe.utils.background_jobs.enqueue(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 118, in enqueue
    return frappe.call(method, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/__init__.py", line 1726, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/india_compliance/india_compliance/gst_india/doctype/gst_settings/gst_settings.py", line 419, in update_e_invoice_status
    update_pending_status(e_invoice_applicability_date)
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/india_compliance/india_compliance/gst_india/doctype/gst_settings/gst_settings.py", line 483, in update_pending_status
    query.run()
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/database/postgres/database.py", line 326, in sql
    return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/karunasagarravangave/plsbench/frappe-bench/apps/frappe/frappe/database/database.py", line 230, in sql
    self._cursor.execute(query, values)
psycopg2.errors.SyntaxError: syntax error at or near "JOIN"
LINE 1: UPDATE "tabSales Invoice" JOIN "tabSales Invoice Item" ON "t...
                                  ^

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ksagar8848 ksagar8848 added bug Something isn't working GST Settings labels Dec 23, 2024
@sibikumarkuppusamy sibikumarkuppusamy self-assigned this Dec 24, 2024
@sibikumarkuppusamy sibikumarkuppusamy self-assigned this Dec 24, 2024
@Nandhini8848 Nandhini8848 self-assigned this Dec 24, 2024
@Nandhini8848 Nandhini8848 mentioned this issue Dec 24, 2024
@Nandhini8848 Nandhini8848 linked a pull request Dec 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GST Settings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants