Race condition on topic assign

(Joshua Rosenfeld) #1

Found a small bug (race condition?) @sam. Two different users can assign the topic at the same time.

Discourse Assign
(Sam Saffron) #3

Not much we can do here sadly, we allow already assigned topics to be assigned to somebody new.

(Jeff Atwood) #4

This is not a new person though it is the same person.

(Sam Saffron) #5

Ahh did not notice that, I guess we can error out here.

(Sam Saffron) #6

#pr-welcome for:

  • IF topic is already assigned
  • AND you are attempting to assign to the same person already assigned
  • RAISE A non 400 error “Topic is already assigned to XYZ” and display to client.
  • Test on both mobile and desktop
  • Include a controller test at least in the PR

(Saurabh Patel) #7

I will try to submit PR for this.


(Saurabh Patel) #8

This is fixed now.

(Joshua Rosenfeld) closed #9

This topic was automatically closed after 34 hours. New replies are no longer allowed.