Use a default value for the "embedded" config
This commit is contained in:
		
							parent
							
								
									e59e210834
								
							
						
					
					
						commit
						bb08fb9eb5
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -834,7 +834,7 @@ class ModelMeta(ModelMetaclass):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Not an abstract model class or embedded model, so we should let the
 | 
					        # Not an abstract model class or embedded model, so we should let the
 | 
				
			||||||
        # Migrator create indexes for it.
 | 
					        # Migrator create indexes for it.
 | 
				
			||||||
        if abc.ABC not in bases and not new_class._meta.embedded:
 | 
					        if abc.ABC not in bases and not getattr(new_class._meta, 'embedded', False):
 | 
				
			||||||
            key = f"{new_class.__module__}.{new_class.__qualname__}"
 | 
					            key = f"{new_class.__module__}.{new_class.__qualname__}"
 | 
				
			||||||
            model_registry[key] = new_class
 | 
					            model_registry[key] = new_class
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -294,6 +294,7 @@ def test_recursive_query_field_resolution(members):
 | 
				
			||||||
    member1.save()
 | 
					    member1.save()
 | 
				
			||||||
    actual = Member.find(Member.orders.items.name == "Ball").all()
 | 
					    actual = Member.find(Member.orders.items.name == "Ball").all()
 | 
				
			||||||
    assert actual == [member1]
 | 
					    assert actual == [member1]
 | 
				
			||||||
 | 
					    assert actual[0].orders[0].items[0].name == "Ball"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_full_text_search(members):
 | 
					def test_full_text_search(members):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue