-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor tcms.testcases.views.plan_from_request_or_none method #303
Comments
This method is called 6 times. At least 1 is GET and at least 1 is POST, so this behavior must be kept for now.
This has been refactored and now it is now returning either I am closing this, because I think this method cannot be simplified further. |
Currently, this method accepts both
GET
andPOST
request. We need to examine carefully whether this is the desired functionality.Also, the current implementation returns either
TestPlan
object, anid
orNone
. In my opinion, returning just theid
is useless, because if you need just theid
you can get it directly from the request, without calling this method. Moreover, this functionality (that returns just theid
) is used at only one place. This means we can easily remove it from the method.The text was updated successfully, but these errors were encountered: