Code

Opened 2 years ago

Closed 23 months ago

#17328 closed Bug (fixed)

OpenLayersWidget needs _has_changed() method

Reported by: django@… Owned by: nobody
Component: GIS Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The OpenLayersWidget does not currently define a custom _has_changed() method. This leads to the problem that it will always report a relevant form field as having been changed, even when that is not the case (the initial value is usually a geometry object, where as the data for comparison is a string.

Many widgets overload _has_changed(), providing a custom method of testing equivalence, but this appears to have been forgotten for OpenLayersWidget.

Attachments (1)

ticket17328.patch (3.2 KB) - added by django@… 2 years ago.
has_changed for OpenLayersWidget

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by django@…

has_changed for OpenLayersWidget

comment:1 Changed 2 years ago by django@…

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 2 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 23 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [9c096ab981d57123a0774f9ddf229084e0bb54a1]:

Fixed #17328 -- Added OpenLayersWidget _has_changed method

Thanks Will Hardy for the report and the patch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.