mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-13 00:20:17 +08:00
fixes, add some testing folders
This commit is contained in:
1 parent
3dcab64e07
commit
69d4ccaf54
31 files changed
+319
-236
No files matched your search
@@ -24,8 +24,11 @@ def determine_model_cls_from_string_for_migrations(ctx: MethodContext) -> Type:
|
||||
if 'model_name' not in ctx.callee_arg_names:
|
||||
return ctx.default_return_type
|
||||
|
||||
model_name_expr = ctx.args[ctx.callee_arg_names.index('model_name')][0]
|
||||
model_name = get_string_value_from_expr(model_name_expr)
|
||||
model_name_expr_tuple = ctx.args[ctx.callee_arg_names.index('model_name')]
|
||||
if not model_name_expr_tuple:
|
||||
return ctx.default_return_type
|
||||
|
||||
model_name = get_string_value_from_expr(model_name_expr_tuple[0])
|
||||
if model_name is None:
|
||||
return ctx.default_return_type
|
||||
|
||||
|
||||
Reference in new issue
Block a user