From 4d972571d0278e518c7a53c521798a58769dcf2f Mon Sep 17 00:00:00 2001 From: jdcaballerov Date: Tue, 1 Dec 2020 10:46:11 -0500 Subject: [PATCH 1/3] Hotfix public page search No ordering causes warning and fallback to default unfiltered QuerySet --- archivebox/core/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/core/views.py b/archivebox/core/views.py index 7cd8b104..dfea7700 100644 --- a/archivebox/core/views.py +++ b/archivebox/core/views.py @@ -92,12 +92,13 @@ class PublicArchiveView(ListView): template = 'snapshot_list.html' model = Snapshot paginate_by = 100 + ordering = ['title'] def get_queryset(self, **kwargs): qs = super().get_queryset(**kwargs) query = self.request.GET.get('q') if query: - qs = Snapshot.objects.filter(title__icontains=query) + qs = qs.filter(title__icontains=query) for snapshot in qs: snapshot.icons = get_icons(snapshot) return qs From 7299b1f5aec7f462ee1cb50fcf912b120a511d43 Mon Sep 17 00:00:00 2001 From: Hawken Rives Date: Wed, 2 Dec 2020 16:28:26 -0600 Subject: [PATCH 2/3] fix "inconsisntencies" typo in error message --- archivebox/index/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/index/__init__.py b/archivebox/index/__init__.py index 890777c8..dfc1c839 100644 --- a/archivebox/index/__init__.py +++ b/archivebox/index/__init__.py @@ -233,7 +233,7 @@ def write_main_index(links: List[Link], out_dir: Path=OUTPUT_DIR, finished: bool except (KeyboardInterrupt, SystemExit): stderr('[!] Warning: Still writing index to disk...', color='lightyellow') - stderr(' Run archivebox init to fix any inconsisntencies from an ungraceful exit.') + stderr(' Run archivebox init to fix any inconsistencies from an ungraceful exit.') with timed_index_update(out_dir / SQL_INDEX_FILENAME): write_sql_main_index(links, out_dir=out_dir) os.chmod(out_dir / SQL_INDEX_FILENAME, int(OUTPUT_PERMISSIONS, base=8)) # set here because we don't write it with atomic writes From b186e98cd2eeb5cb375dedfaa21abcae1abec2be Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 3 Dec 2020 11:33:10 -0500 Subject: [PATCH 3/3] only docker push on release or master commit --- .github/workflows/docker.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a609e55f..e6361fde 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,8 +1,12 @@ name: Docker Push on: - workflow_dispatch: push: + branches: + - master + release: + types: + - created jobs: buildx: