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

update: frappe-ui #295

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: transition to frappe ui list
feat: allow bulk actions
fix: improve download
  • Loading branch information
safwansamsudeen committed Jan 16, 2025
commit e58299df0ba10002dc0209ba76dd9b2799ee9914
9 changes: 4 additions & 5 deletions drive/api/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ def list_recents(order_by="last_interaction", limit=100, offset=0):


@frappe.whitelist()
def remove_recents(entity_names=None, clear_all=False):
def remove_recents(entity_names=[], clear_all=False):
"""
Clear recent DriveEntities for specified user

Expand All @@ -1236,12 +1236,11 @@ def remove_recents(entity_names=None, clear_all=False):
"""

if clear_all:
frappe.db.delete("Drive Entity Log", {"user": frappe.session.user})
return
if isinstance(entity_names, str):
entity_names = json.loads(entity_names)
return frappe.db.delete("Drive Entity Log", {"user": frappe.session.user})

if not isinstance(entity_names, list):
frappe.throw(f"Expected list but got {type(entity_names)}", ValueError)
print("HO", entity_names)
for entity in entity_names:
existing_doc = frappe.db.exists(
{
Expand Down
Loading
Loading