DeeMcCart / CI_PP4_Financial_Planner

Financial_Planner: Authorative information on financial processes in Republic of Ireland
0 stars 1 forks source link

Bug: Multiple user comments lose 'Your comment is awaiting approval' if one comment approved #25

Closed DeeMcCart closed 1 year ago

DeeMcCart commented 1 year ago

From user story/ issue #18 30/10/23 end of day - there is a small bug within comment processing. The bug is that if user1 creates a comment which is awaiting approval, the screen will initially display 'your comment is awaiting approval' and user1 (correctly) cannot add a second comment.
If user2 then creates a comment on the same article and gets the message 'your comment is awaiting approval', user2 then can't add additional comments (working correctly). However if EITHER comment is approved then the 'your comment is awaiting approval' message disappears for ALL users. This means that user1/user2 could then add more unapproved comments which pile up waiting for approval. Raised as a bug under issue #25

Acceptance Criteria

Tasks

DeeMcCart commented 1 year ago

31/10/23 Tried using the following code snippet in views.py, but couldnt get an output to the console log: commented = False print('User ', self.request.user.id) if article.comments.filter(id=self.request.user.id, approved=False).exists(): print('Unapproved comments exist for this user!') commented = True

DeeMcCart commented 1 year ago

Closing out this issue #25 as its been raised against the wrong template - have raised issue #28 to deal with this intead. Also moved into MVP Milestone rather than Release1 Milestone as it really needs to be fixed before doing any further development