Skip to content

Commit

Permalink
feat: removed references to "native_land_slug" in code
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-hd committed Nov 28, 2023
1 parent 76a4776 commit bce2a80
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/base/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ def get_sub_projects(self, obj):
class CommunityNativeLandSlugSerializer(serializers.ModelSerializer):
class Meta:
model = Community
fields = ('id', 'community_name', 'native_land_slug',)
fields = ('id', 'community_name')
4 changes: 2 additions & 2 deletions api/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def multisearch_date(self, request, unique_id):
return Response(status=status.HTTP_404_NOT_FOUND)

class CommunitySlugList(generics.ListAPIView):
queryset = Community.objects.exclude(native_land_slug=None)
queryset = Community.objects
serializer_class = CommunityNativeLandSlugSerializer

filter_backends = [filters.SearchFilter]
search_fields = ['native_land_slug']
search_fields = []
1 change: 0 additions & 1 deletion communities/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class Community(models.Model):
is_approved = models.BooleanField(default=False, null=True)
approved_by = models.ForeignKey(User, null=True, blank=True, on_delete=models.SET_NULL, related_name="community_approver")
created = models.DateTimeField(auto_now_add=True, null=True)
native_land_slug = models.SlugField(max_length = 200, blank=True, null=True)

source_of_boundaries = models.SlugField(max_length=200, blank=True, null=True)
name_of_boundaries = models.SlugField(max_length=200, blank=True, null=True)
Expand Down
1 change: 0 additions & 1 deletion localcontexts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,6 @@ class BCLabelAdmin(admin.ModelAdmin):
class CommunityAdmin(admin.ModelAdmin):
list_display = ('community_name', 'community_creator', 'contact_name', 'contact_email', 'is_approved', 'created', 'country')
search_fields = ('community_name', 'contact_name', 'contact_email',)
readonly_fields = ('native_land_slug',)

class JoinRequestAdmin(admin.ModelAdmin):
list_display = ('community', 'institution', 'user_from', 'user_to', 'status', 'date_sent')
Expand Down

0 comments on commit bce2a80

Please sign in to comment.