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

[BUG]: #10

Open
Xappiens opened this issue Sep 17, 2024 · 0 comments
Open

[BUG]: #10

Xappiens opened this issue Sep 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Xappiens
Copy link

App Versions

{
	"alerts": "1.0.8",
	"builder": "1.11.6",
	"crm": "1.21.0",
	"erpnext": "15.35.1",
	"frappe": "15.40.6",
	"frappe_better_list_view": "1.4.0",
	"frappe_whatsapp": "1.0.7",
	"hrms": "15.28.3",
	"insights": "2.2.6",
	"meeting_management": "0.0.1",
	"print_designer": "1.4.2",
	"whatsapp_chat": "0.0.1"
}

Route

Workspaces/Home

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, 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 49, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1775, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/alerts/alerts/utils/alert.py", line 144, in sync_alerts
    data["alerts"] = get_user_alerts(user)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "apps/alerts/alerts/utils/alert.py", line 260, in get_user_alerts
    data = filter_seen_alerts(data, user, parents, today)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/alerts/alerts/utils/alert.py", line 341, in filter_seen_alerts
    seen_by = get_alerts_seen_by(user, alerts)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/alerts/alerts/utils/alert.py", line 327, in get_alerts_seen_by
    .where(doc.parent.isin(alerts))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/utils.py", line 50, in _copy
    result = func(self_copy, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/queries.py", line 930, in where
    if not self._validate_table(criterion):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/queries.py", line 1155, in _validate_table
    for field in term.fields_():
                 ^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/terms.py", line 57, in fields_
    return set(self.find_(Field))
               ^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/terms.py", line 37, in find_
    return [node for node in self.nodes_() if isinstance(node, type)]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/terms.py", line 37, in <listcomp>
    return [node for node in self.nodes_() if isinstance(node, type)]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.11/site-packages/pypika/terms.py", line 795, in nodes_
    yield from self.container.nodes_()
               ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'nodes_'

Request Data

{
	"type": "POST",
	"args": {
		"init": 1
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/alerts.utils.sync_alerts",
	"request_id": "56b872d9-c5d7-46a3-9fe5-79686bc784ac"
}

Response Data

{
	"exception": "AttributeError: 'str' object has no attribute 'nodes_'",
	"exc_type": "AttributeError",
	"_exc_source": "alerts (app)"
}
@Xappiens Xappiens added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants