Ticket #16556: srs.patch

File srs.patch, 641 bytes (added by chander.ganesan@…, 4 years ago)

Patch to correct this bug ..

  • srs.py

    old new  
    6969    try:
    7070        # Try getting via SRID only, because using all kwargs may
    7171        # differ from exact wkt/proj in database.
    72         sr = SpatialRefSys.objects.get(srid=srs.srid)
     72        sr = SpatialRefSys.objects.using(database).get(srid=srs.srid)
    7373    except SpatialRefSys.DoesNotExist:
    74         sr = SpatialRefSys.objects.create(**kwargs)
     74        sr = SpatialRefSys.objects.using(database).create(**kwargs)
    7575
    7676# Alias is for backwards-compatibility purposes.
    7777add_postgis_srs = add_srs_entry
Back to Top