Skip to content

Commit

Permalink
Fix leftover linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Therrien-Beslogic committed Mar 23, 2024
1 parent 40d19b8 commit f48c032
Show file tree
Hide file tree
Showing 8 changed files with 2,618 additions and 2,494 deletions.
2 changes: 1 addition & 1 deletion canopeum_backend/canopeum_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"USER": "root",
"PASSWORD": "canopeum",
"HOST": "localhost",
"PORT": "3306",
"PORT": "3308", # Same as in docker-compose.yml
},
}

Expand Down
7 changes: 2 additions & 5 deletions canopeum_backend/canopeum_backend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,8 @@ class PostListAPIView(APIView):
def get(self, request):
comment_count = Comment.objects.filter(post=request.data.get("id")).count()
has_liked = 0
siteId = request.GET.get("siteId", "")
if siteId != "":
posts = Post.objects.filter(site=siteId)
else:
posts = Post.objects.all()
site_id = request.GET.get("siteId", "")
posts = Post.objects.filter(site=site_id) if not site_id else Post.objects.all()
serializer = PostSerializer(posts, many=True, context={"comment_count": comment_count, "has_liked": has_liked})
return Response(serializer.data)

Expand Down
4 changes: 2 additions & 2 deletions canopeum_frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const Home = () => {
const fetchData = async () => {
setIsLoading(true)
try {
const response = await api().analytics.batches();
setData(response);
const response = await api().analytics.batches()
setData(response)
} catch (error_: unknown) {
setError(ensureError(error_))
} finally {
Expand Down
4 changes: 3 additions & 1 deletion canopeum_frontend/src/pages/MapSite.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { useParams } from 'react-router-dom'

const MapSite = () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- We plan on using it
/* eslint-disable @typescript-eslint/no-unused-vars -- We plan on using it */
// @ts-expect-error: We plan on using it
const { siteId } = useParams()
/* eslint-enable @typescript-eslint/no-unused-vars */

return (
<div>
Expand Down
Loading

0 comments on commit f48c032

Please sign in to comment.