#37135: LayerMapping unable to update PointFields with "unique" keyword 
parameter
-------------------------------+------------------------------------
     Reporter:  Agnès Haasser  |                    Owner:  (none)
         Type:  Bug            |                   Status:  new
    Component:  GIS            |                  Version:  5.2
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by Jacob Walls):

 * stage:  Unreviewed => Accepted
 * summary:
     LayerMapping utility seems unable to import PointFields with "unique"
     keyword parameter
     =>
     LayerMapping unable to update PointFields with "unique" keyword
     parameter

Comment:

 Thanks, reproduced at 170975c5bdc3fc69b15e46f50df7b48eb9e1115c with this
 rough test:

 {{{#!diff
 diff --git a/tests/gis_tests/layermap/tests.py
 b/tests/gis_tests/layermap/tests.py
 index c590defbd0..ec8d5dc89b 100644
 --- a/tests/gis_tests/layermap/tests.py
 +++ b/tests/gis_tests/layermap/tests.py
 @@ -102,6 +102,14 @@ class LayerMapTest(TestCase):
          lm.save()
          self.assertEqual(City.objects.count(), 3)

 +    def test_layermap_unique_update(self):
 +        lm = LayerMapping(City, city_shp, city_mapping, unique="point")
 +        lm.save()
 +        # Update.
 +        lm.save()
 +
 +        # some assertion about the correct result...
 +
      def test_layermap_strict(self):
          "Testing the `strict` keyword, and import of a LineString
 shapefile."
          # When the `strict` keyword is set an error encountered will
 force
 }}}

 Would you like submit a PR?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37135#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e8e37f777-9a8c93c8-4238-4f6f-ab3a-4a32de13dddc-000000%40eu-central-1.amazonses.com.

Reply via email to