mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't enqueue imported users when there're multiple custom fields. (#11559)
My initial implementation didn't consider this case. We should skip imported users if the "imported_id" field is present, even if there're other custom fields.
This commit is contained in:
@@ -80,5 +80,13 @@ describe Jobs::EnqueueSuspectUsers do
|
||||
|
||||
expect(ReviewableUser.where(target: suspect_user).exists?).to eq(true)
|
||||
end
|
||||
|
||||
it 'ignores imported users even if they have multiple custom fields' do
|
||||
suspect_user.upsert_custom_fields({ field_a: 'value', field_b: 'value', import_id: 'fake_id' })
|
||||
|
||||
subject.execute({})
|
||||
|
||||
expect(ReviewableUser.where(target: suspect_user).exists?).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user