VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
413 stars 65 forks source link

CU-2dz37t8 - issue 137 - comments are broken if user was deleted #138

Closed cyp3rius closed 2 years ago

cyp3rius commented 2 years ago

Ticket

https://github.com/VirtusLab/strapi-plugin-comments/issues/137

Summary

What does this PR do/solve?

Covers case when Strapi User was removed and still got some comments assigned. Prevents interface crashes.

Test Plan

  1. Create Strapi User
  2. Add comment associated to newly created user
  3. Remove user
  4. See that Author removed is visible instead of name and interface is not crashing
cyp3rius commented 2 years ago

Task linked: CU-2dz37t8 Comments are broken if user was deleted

codecov-commenter commented 2 years ago

Codecov Report

Merging #138 (b821fdc) into master (9199a65) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #138   +/-   ##
=======================================
  Coverage   61.82%   61.82%           
=======================================
  Files           9        9           
  Lines         516      516           
  Branches      201      201           
=======================================
  Hits          319      319           
  Misses        194      194           
  Partials        3        3           
Flag Coverage Δ
unittest 61.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9199a65...b821fdc. Read the comment docs.