Project

Profile

Help

Issue #5656

Updated by daviddavis over 4 years ago

Steps to reproduce: 

 <pre> 
 $ http :/pulp/api/v3/remotes/file/file/ name=rebecca_black url="http://friday/" 
 $ http :/pulp/api/v3/remotes/rpm/rpm/ name=rebecca_black url="http://friday/" 
 </pre> 

 The problem is that uniqueness across base fields on Master/Detail models are scoped universally instead of per type. 

 Possible Solutions: 
 1. Keep it the way it is with universal uniqueness. This is what Pulp 2 does (for repos at least). 
 2. Use unique_together to enforce unique constraints per pulp_type[0] 
 3. Remove these unique constraints completely and allow for instance dupe FileRemote names  

 [0] I think django 2.2+ actually recommends using Constraints now: https://docs.djangoproject.com/en/2.2/ref/models/options/#django.db.models.Options.constraints

Back