Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Field of type Upload causing white screen #6

Open
Connor-Moesol opened this issue Jul 31, 2024 · 0 comments
Open

Error: Field of type Upload causing white screen #6

Connor-Moesol opened this issue Jul 31, 2024 · 0 comments

Comments

@Connor-Moesol
Copy link

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant