This is not how we handle exception, check around in the library for examples.
Same here, this is not how we should do
Technically these are not users that are not watching but users that have unwatched the project.
unwatched
Users that are not watching at all, shouldn't be listed in the ProjectUser table at all :)
There has to be a way to avoid all this redundant code and just rely on the repo object.
This should be using a form from wtforms via CSRF protection.
We could also rely on the usual project name/project user to find the project instead of adding code around the project id that we do not use anywhere else.
Extra < at the end
<
Couple of general remarks:
new_ui
Here I don't need any exception message. I just need True/False from this method.
Yes, my mistake wrong name for the method. I thought It will be more flexible and the other options for the user will be still there besides, he will only not get the emails. Once I delete the entire row the relation between the user and the project will be completely destroy.
This is just like the username or the repo which are being set for all the views separately. But still trying for an another way.
I am working on that and I'll fix this. I cannot use the project name because the project name is not unique in the entire table.
In my file, there is nothing like <. Please tell me how can I detect that?
Maybe, but I think we should be consistent in our behavior
using a relation in the model, we should be able to do something like: repo.watchers or so
repo.watchers
The combo project name + username is unique so that's something you can use (and that's what we use everywhere)
I don't know, I'm just seeing it here :)
You need to rebase your branch on the top of new_ui to avoid the conflict.
Closing this in favor of https://pagure.io/pagure/pull-request/555