Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:  duplicate
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #15130. Please leave comments in the original ticket.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182876c2be4-b4c95786-25cb-4df7-9265-0edabb655681-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by François Granade):

 * Attachment "patch_33912.diff" added.

 simple patch that fixes the problem. See comments on why it doesn't
 include a test (yet..)

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182876a9e6d-f913e438-31f5-40de-85fe-8e7c57a0a5d9-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by François Granade):

 indeed, that's the same issue as #15130 . I'm attaching a patch that fixes
 it , but it doesn't include a test.

 I can write a test to get the patch accepted, but I would need some
 guidance on writing the test: I cannot find example of tests that deal
 with the admin *and* with multiple database, so I don't know how to write
 it... Could someone with experience point me to some example of tests I
 could copy/reuse, or to a general idea of how to write a test on the admin
 with multiple databases ? Thanks in advance.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701828769f3e0-c5d4697e-caf2-4897-a384-b0aaa0af6c1b-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK (was: In the ad

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by François Granade):

 * keywords:  admin multidb => admin multi-db


Comment:

 This may be caused by (and somewhat a simple test case of)
 https://code.djangoproject.com/ticket/15130 ?

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182874e33a6-89091029-1e1e-42f2-bb65-66aad0071a63-00%40eu-central-1.amazonses.com.