Skip to content

Commit

Permalink
Try some failing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
etj committed Oct 12, 2023
1 parent aa7526e commit 19d3369
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "flake8"
name: "Code formatting"

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
branches: [ "master", 4.0.x, 4.1.x ]

jobs:
check_syntax:
validate:

strategy:
fail-fast: false
Expand All @@ -29,12 +29,12 @@ jobs:
- name: Install flake8 & black
run: pip install flake8 black

- name: Check with flake8
- name: "Check: flake8"
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 geonode --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 geonode --count --statistics
- name: Check formatting
- name: "Check: black"
run: black --check geonode
5 changes: 4 additions & 1 deletion geonode/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import json
import time
import os

from django.apps import apps
from django.db.models import Q
Expand Down Expand Up @@ -70,11 +71,13 @@


class CountJSONSerializer(Serializer):

"""Custom serializer to post process the api and add counts"""

def get_resources_counts(self, options):
if settings.SKIP_PERMS_FILTER:
resources = ResourceBase.objects.all()
resources =
ResourceBase.objects.all()
else:
resources = get_objects_for_user(options["user"], "base.view_resourcebase")

Expand Down

0 comments on commit 19d3369

Please sign in to comment.