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
@@ -41,9 +41,9 @@ def get_package_namespaces():
class PackageForm(forms.Form):
- type = forms.ChoiceField(choices=get_package_types())
+ type = forms.ChoiceField(choices=get_package_types)
namespace = forms.ChoiceField(
- choices=get_package_namespaces(), required=False)
+ choices=get_package_namespaces, required=False)
name = forms.CharField(widget=forms.TextInput(
attrs={'placeholder': 'package name'}))
version = forms.CharField(widget=forms.TextInput(
