Skip to content

fix: View logging fails if no referrer [frappe]

Bot Dokos requested to merge ft-commit-b71d01e1b44434 into develop

From: https://github.com/frappe/frappe/commit/b71d01e1b44434a8f2241327f4109c0f6f209c6a
Date: 2024-01-01 19:14:03+05:30
By: Ankush Menat

fix: View logging fails if no referrer

AttributeError: 'NoneType' object has no attribute 'startswith'
  File "frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "__init__.py", line 1680, in call
    return fn(*args, **newargs)
  File "frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "frappe/website/doctype/web_page_view/web_page_view.py", line 58, in make_view_log
    if not frappe.utils.is_site_link(path):
  File "frappe/utils/data.py", line 2488, in is_site_link
    if link.startswith("/"):

This is a commit that is not part of any pull request.



Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-commit-b71d01e1b44434

# Make changes then rebase
git rebase -i upstream/develop --reapply-cherry-picks

# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue

# Force-push changes
git push --force-with-lease

Merge request reports