Code

#20669 closed Cleanup/optimization (wontfix)

Layermapping can fail with TypeError

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

Description

because "m" (~ line 554) may have been created via a variety of ways, it appears that in some cases it may not have the "using" keyword as an argument (perhaps not created correctly as a Model object?). (I've seen this problem repeatedly on batch imports)

https://github.com/jingles/django/commit/ce2d467288e87f3093b0c134b7f2488d31c90b57

Attachments (0)

Change History (1)

comment:1 Changed 10 months ago by claudep

  • Component changed from Uncategorized to GIS
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed
  • Type changed from Uncategorized to Cleanup/optimization

I guess that such an error is a symptom of a bad overridden save() method of some model (missing **kwargs in the method signature).

Seeing a similar situation in loaddata, we are not catching TypeError there, so I'm not inclined to accept it here.

If my analysis seems wrong, feel free to reopen with a test case if possible.

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.