Skip to content

Error: Field of type Upload causing white screenΒ #6

@Connor-Moesol

Description

@Connor-Moesol

I wanted to create a field in my model with the type Upload. However I could not create this directly in my model because it is not a type that is supported. So I needed to create a resolver to add a field of type Upload!. When I create this resolver it made conveyor-admin white screen.

breaking code:
document_manager = ModelManager(Model)
document_manager.create_field.args["file"] = Argument("Upload!")
document_manager.update_field.args["file"] = Argument("Upload")

@document_manager.create_field.resolver
def resolve...

@document_manager.update_field.resolver
def resolve...

error messages in browser:
" This page failed to load a stylesheet from a URL. "
" GET https://esm.sh/@autoinvent/[email protected]/dist/styles/index.css net::ERR_ABORTED 404 (Not Found) "
" TypeError: Cannot read properties of undefined (reading 'create')
at IntrospectionProvider.tsx:132:60 "

Workaround is to add a "file" field into my model and add the following code before the "create_field" and "update_field" lines above :
del document_manager.create_field.args["file"]
del document_manager.update_field.args["file"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions