Skip to content

Commit f5b8d77

Browse files
committed
Pass function instead function call in forms
This is done because when running migrations, the function which made db queries was being run hence failing the CI. By passing the function itself instead, this issue is fixed Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
1 parent 083cecf commit f5b8d77

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vulnerabilities/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def get_package_namespaces():
4141

4242
class PackageForm(forms.Form):
4343

44-
type = forms.ChoiceField(choices=get_package_types())
44+
type = forms.ChoiceField(choices=get_package_types)
4545
namespace = forms.ChoiceField(
46-
choices=get_package_namespaces(), required=False)
46+
choices=get_package_namespaces, required=False)
4747
name = forms.CharField(widget=forms.TextInput(
4848
attrs={'placeholder': 'package name'}))
4949
version = forms.CharField(widget=forms.TextInput(

0 commit comments

Comments
 (0)