JaqiKal / pixavibe-frontend

The Pixavibe is a social media website for sharing photos. Created as part of my full-stack portfolio project 5 for the Code Institute diploma in full stack software development.
0 stars 0 forks source link

[BUG] Comment edit save fails to display updated content #61

Closed JaqiKal closed 1 month ago

JaqiKal commented 1 month ago

Describe the bug Blog post owner edits own comment and comment edit save fails to display updated content.

To Reproduce

  1. Go to a comment that the currently logged in user owns and click on the Dropdown Menu.
  2. Choose the edit option and the edit form will show up.
  3. If you choose to make an edit and click save, the updated version of that comment will show up.
  4. See error
    Error: Request failed with status code 400
    at createError (createError.js:16:1)
    at settle (settle.js:17:1)
    at XMLHttpRequest.onloadend (xhr.js:54:1)

Expected behavior If you choose to make an edit and click save, the updated version of that comment will show up.

Screenshots n/a

Desktop / Smartphone (please complete the following information):**

Additional context Found during development the Frontend part of of comments function.

JaqiKal commented 1 month ago

Solution: In pixavibe-api, app comments, views.py, to import missing var CommentDetailSerializer and update incorrect var in class commentDetail.