mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Now asset_ids are going to be editable, removed that limitation from form
This commit is contained in:
@@ -8,10 +8,6 @@ class AssetForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = models.Asset
|
||||
fields = '__all__'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(AssetForm, self).__init__(*args, **kwargs)
|
||||
self.fields['asset_id'].disabled = True #You should not be able to change the asset ID, either in update or create
|
||||
|
||||
def clean_date_sold(self):
|
||||
if self.cleaned_data["date_sold"] and self.cleaned_data["date_acquired"] > self.cleaned_data["date_sold"]:
|
||||
|
||||
Reference in New Issue
Block a user