#35658: InMemoryFileNode object has no attribute "name"
-------------------------------------+-------------------------------------
Reporter: David | Owner: Lucas
| Esposito
Type: Bug | Status: closed
Component: File | Version: 4.2
uploads/storage | Resolution:
Severity: Normal | worksforme
Keywords: storage | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):
* resolution: => worksforme
* status: assigned => closed
Comment:
Hi David, I have not been able to replicate the error on main or Django
4.2
{{{#!python
@override_settings(
STORAGES={"default": {"BACKEND":
"django.core.files.storage.InMemoryStorage"}}
)
class FileFieldModelTest(TestCase):
def test_repr(self):
test = FileFieldModel.objects.create(
file=ContentFile(b'content', 'myfile.txt')
)
self.assertEqual(repr(test.file), "<FieldFile: myfile.txt>")
}}}
Can you share the full traceback or give more instructions on how to
replicate the error?
--
Ticket URL: <https://code.djangoproject.com/ticket/35658#comment:9>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/010701912cee4d11-d8bff8d6-ea95-4dae-aaa0-a2b47342f401-000000%40eu-central-1.amazonses.com.