repo stringclasses 1
value | instance_id stringlengths 20 20 | base_commit stringlengths 40 40 | patch stringlengths 397 10.8k | test_patch stringlengths 542 11.2k | problem_statement stringlengths 190 6.76k | hints_text stringlengths 0 13.8k | created_at stringdate 2018-06-26 23:30:51 2023-07-17 20:28:41 | version stringclasses 8
values | FAIL_TO_PASS stringlengths 39 32.6k | PASS_TO_PASS stringlengths 2 107k | environment_setup_commit stringclasses 8
values | difficulty stringclasses 3
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
django/django | django__django-16950 | f64fd47a7627ed6ffe2df2a32ded6ee528a784eb | diff --git a/django/forms/models.py b/django/forms/models.py
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1177,7 +1177,13 @@ def add_fields(self, form, index):
to_field = self.instance._meta.get_field(kwargs["to_field"])
else:
to_field = self.instance._met... | diff --git a/tests/model_formsets/test_uuid.py b/tests/model_formsets/test_uuid.py
--- a/tests/model_formsets/test_uuid.py
+++ b/tests/model_formsets/test_uuid.py
@@ -43,6 +43,8 @@ def test_inlineformset_factory_ignores_default_pks_on_submit(self):
}
)
self.assertTrue(formset.is_valid())
... | Django Admin with Inlines not using UUIDField default value
Description
(last modified by Joseph Metzinger)
Hello,
I am a long time django user, first time bug reporter, so please let me know if I need to do anything else to help get this bug fixed :)
I am using Django 3.1.3 and python 3.8.5 and have cerated a ... | I made a toy project containing all the code to reproduce the error and zipped it.
Thanks for the detailed report. I was able to reproduce this issue. It looks that formsets' validation mutates the main object, because new_object.id is not empty before the all_valid() call: >>> new_object.id e13fd82c-c3fc-42dc-ac12-57... | 2023-06-06T19:58:48Z | 5.0 | ["If form data is provided, a parent's auto-generated alternate key is"] | ["#24377 - Inlines with a model field default should ignore that default", "#24377 - If we're adding a new object, a parent's auto-generated pk", "#24958 - Variant of test_inlineformset_factory_nulls_default_pks for"] | 4a72da71001f154ea60906a2f74898d32b7322a7 | 15 min - 1 hour |
django/django | django__django-17084 | f8c43aca467b7b0c4bb0a7fa41362f90b610b8df | diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -403,6 +403,7 @@ def get_aggregation(self, using, aggregate_exprs):
# Store annotation mask prior to temporarily adding aggregations for
# resolving pur... | diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -28,6 +28,7 @@
Value,
Variance,
When,
+ Window,
)
from django.db.models.expressions import Func, RawSQL
from django.db.models.functions import (
@@ -2207,3 +2208... | Cannot use aggregate over window functions since 4.2
Description
(last modified by younes-chaoui)
After upgrading to Django 4.2, I encountered an exception when executing ORM queries that involve aggregates over Window functions. The specific error was psycopg2.errors.GroupingError: aggregate function calls can... | Hello! Could you please provide a minimal Django test project with models to reproduce this issue? Or a regression test that would pass on Django 4.1 but fail in 4.2? Thank you! | 2023-07-17T16:54:19Z | 5.0 | ["test_referenced_window_requires_wrapping (aggregation.tests.AggregateAnnotationPruningTests.test_referenced_window_requires_wrapping)"] | ["test_non_aggregate_annotation_pruned (aggregation.tests.AggregateAnnotationPruningTests.test_non_aggregate_annotation_pruned)", "test_referenced_aggregate_annotation_kept (aggregation.tests.AggregateAnnotationPruningTests.test_referenced_aggregate_annotation_kept)", "test_referenced_group_by_annotation_kept (aggregat... | 4a72da71001f154ea60906a2f74898d32b7322a7 | 15 min - 1 hour |
django/django | django__django-17087 | 4a72da71001f154ea60906a2f74898d32b7322a7 | diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py
--- a/django/db/migrations/serializer.py
+++ b/django/db/migrations/serializer.py
@@ -168,7 +168,7 @@ def serialize(self):
):
klass = self.value.__self__
module = klass.__module__
- return ... | diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -211,6 +211,10 @@ class NestedChoices(models.TextChoices):
X = "X", "X value"
Y = "Y", "Y value"
+ @classmethod
+ def method(cls... | Class methods from nested classes cannot be used as Field.default.
Description
(last modified by Mariusz Felisiak)
Given the following model:
class Profile(models.Model):
class Capability(models.TextChoices):
BASIC = ("BASIC", "Basic")
PROFESSIONAL = ("PROFESSIONAL", "Professional")
@classmethod
d... | Thanks for the report. It seems that FunctionTypeSerializer should use __qualname__ instead of __name__: django/db/migrations/serializer.py diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py index d88cda6e20..06657ebaab 100644 a b class FunctionTypeSerializer(BaseSerializer): 168168 ):... | 2023-07-17T20:28:41Z | 5.0 | ["test_serialize_nested_class_method (migrations.test_writer.WriterTests.test_serialize_nested_class_method)"] | ["test_args_kwargs_signature (migrations.test_writer.OperationWriterTests.test_args_kwargs_signature)", "test_args_signature (migrations.test_writer.OperationWriterTests.test_args_signature)", "test_empty_signature (migrations.test_writer.OperationWriterTests.test_empty_signature)", "test_expand_args_signature (migrati... | 4a72da71001f154ea60906a2f74898d32b7322a7 | <15 min fix |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.