Skip to content

Commit

Permalink
When updating interventions, stake field is no more required
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaël UTARD committed Mar 6, 2019
1 parent e7db666 commit 6b8c0a2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CHANGELOG

**Bug fixes**

-
- When updating interventions, stake field is no more required


2.24.4 (2019-03-01)
Expand Down
2 changes: 0 additions & 2 deletions geotrek/maintenance/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ def __init__(self, *args, **kwargs):
initial['topology'] = signage
kwargs['initial'] = initial
super(InterventionCreateForm, self).__init__(*args, **kwargs)
# Stake is computed automatically at creation.
self.fields['stake'].required = False


class ProjectForm(CommonForm):
Expand Down
2 changes: 1 addition & 1 deletion geotrek/maintenance/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Intervention(AddPropertyMixin, MapEntityMixin, AltimetryMixin,
length = models.FloatField(editable=True, default=0.0, null=True, blank=True, db_column='longueur',
verbose_name=_(u"3D Length"))

stake = models.ForeignKey('core.Stake', null=True,
stake = models.ForeignKey('core.Stake', null=True, blank=True,
related_name='interventions', verbose_name=_("Stake"), db_column='enjeu')

status = models.ForeignKey('InterventionStatus', verbose_name=_("Status"), db_column='status')
Expand Down

0 comments on commit 6b8c0a2

Please sign in to comment.