mirror of
https://github.com/discourse/discourse.git
synced 2026-08-05 13:59:03 +08:00
Previously, the reviewable insights metadata was not being serialized correctly for admin users that flagged their own posts. There was a conflict with the order of the `has_one` associations in the `ReviewableSerializer`. When an admin flagged their own post, the user was identical for both the `target_created_by` and `created_by` attributes. This silently dropped the `target_created_by` attribute, resulting in broken metadata (join date, post count) for the flagged post. This commit reordered the `has_one` associations in the `ReviewableSerializer` to ensure that `target_created_by` is serialized before `created_by`. |
||
|---|---|---|
| .. | ||
| assets | ||
| controllers | ||
| helpers | ||
| jobs | ||
| mailers | ||
| models | ||
| queries/reports | ||
| serializers | ||
| services | ||
| views | ||