-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Don't error out on deleted users (#149)
The GuardianExtension#poster_group_allow_translate? method restricts and determines whether a post can be translated based on the poster's group membership. There are reports that this errors out when deleting spammers. The problem is that when a spammer is deleted, their post user_id is nullified, and because the above method doesn't account for this case, we try to call #in_any_groups? on nil, which errors out. This PR fixes that by explicitly accounting for the case of a post with a nil user ID.
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters