HF RL Explorer

Cannot override get FOO display() in Django 2.2+. Description

Cannot override get FOO display() in Django 2.2+. Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). I cannot override the get FIELD display function on models since version 2.2. It works in version 2.1. Example: class FooBar(models.Model): foo bar = models.CharField( ("foo")…

The task

I cannot override the get_FIELD_display function on models since version 2.2. It works in version 2.1. Example: class FooBar(models.Model): foo_bar = models.CharField(_("foo"), choices=[(1, 'foo'), (2, 'bar')]) def __str__(self): return self.get_foo_bar_display() # This returns 'foo' or 'bar' in 2.2, but 'something'…

Part of Lego-X/Lego-RL-SWE-Bench-Verified.