File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -159,16 +159,13 @@ def __init__(
159159 for s , t in (_ .split ("." ) for _ in component_config ["tables" ])
160160 ]
161161 self .parents = sorted (
162- list (
163- set (
164- [
165- p
166- for t in self .tables
167- for p in t .parents (as_objects = True )
168- if p .full_table_name
169- not in (t .full_table_name for t in self .tables )
170- ]
171- )
162+ set (
163+ [
164+ p
165+ for t in self .tables
166+ for p in t .parents (as_objects = True )
167+ if p .full_table_name not in (t .full_table_name for t in self .tables )
168+ ]
172169 ),
173170 key = lambda p : p .full_table_name ,
174171 )
@@ -211,9 +208,7 @@ def dj_query_route(self):
211208 return "Insert successful"
212209
213210 def fields_route (self ):
214- parent_attributes = sorted (
215- list (set (sum ([p .primary_key for p in self .parents ], [])))
216- )
211+ parent_attributes = sorted (set (sum ([p .primary_key for p in self .parents ], [])))
217212 source_fields = {
218213 ** {
219214 (p_name := f"{ p .database } .{ dj .utils .to_camel_case (p .table_name )} " ): {
You can’t perform that action at this time.
0 commit comments