Skip to content

Commit

Permalink
ignore images/sdoc (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
likesclever authored May 18, 2023
1 parent 260fdd2 commit 6b02fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,6 @@ def save_user_activities(session, records):
save_user_activity(session, record)
else:
for record in records:
if os.path.dirname(record['path']) == '/images/auto-upload':
continue
save_user_activity(session, record)

def generate_activity_records(added_files, deleted_files, added_dirs,
Expand Down Expand Up @@ -621,6 +619,8 @@ def generate_activity_records(added_files, deleted_files, added_dirs,
records.append(record)

for record in records:
if os.path.dirname(record['path']) in ['/images/auto-upload', '/images/sdoc']:
records.remove(record)
if 'old_path' in record:
record['old_path'] = record['old_path'].rstrip('/')
record['path'] = record['path'].rstrip('/') if record['path'] != '/' else '/'
Expand Down

0 comments on commit 6b02fc0

Please sign in to comment.