Code

Opened 3 years ago

Closed 3 years ago

#16875 closed Uncategorized (needsinfo)

db.model.FileField's close method doesn't close

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

Description

This doesn't work:

model_object.file.close()

This works:

model_object.file.file.close()

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by carljm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to needsinfo
  • Status changed from new to closed

Lines 124-127 in django/db/models/fields/files.py certainly seems to define a close method that ought to work. (The object that you get when you access a FileField from a model instance is actually FieldFile). Closing "needsinfo" pending more detailed reproduction instructions.

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.