Model Field. hash () should be immutable. Description
Model Field. hash () should be immutable. Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). Field. hash changes value when a field is assigned to a model class. This code crashes with an AssertionError: from django.db import models f = models.CharField(max length=200) d = {f: 1}…
The task
Field.__hash__ changes value when a field is assigned to a model class. This code crashes with an AssertionError: from django.db import models f = models.CharField(max_length=200) d = {f: 1} class Book(models.Model): title = f assert f in d The bug was introduced in #31750. It's unlikely to have been encountered…
Part of Lego-X/Lego-RL-SWE-Bench-Verified.