Skip to content

Invalid type: expected ConfigurationItemCategoryEntity::displayColorRgb to be of type integer, instead got value null, which is NULL.. #58

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

Open
PeterVoskuilen opened this issue Jan 20, 2022 · 4 comments
Labels
needs info Needs more information.

Comments

@PeterVoskuilen
Copy link

PeterVoskuilen commented Jan 20, 2022

Get an error when getting ConfigurationItemCategory fro AutoTask

Invalid type: expected Anteris\Autotask\API\ConfigurationItemCategories\ConfigurationItemCategoryEntity::displayColorRgb to be of type integer, instead got value null, which is NULL..

ConfigurationItemCategories does have RGB value in Autotask as seen in image. although it might be blue because thats a default and value is NULL.

image

Second error:
Public properties displayColorRGB not found on Anteris\Autotask\API\ConfigurationItemCategories\ConfigurationItemCategoryEntity

Resolved by changing line 13 in ConfigurationItemCategoryEntity
public int $displayColorRGB;

@aidan-casey
Copy link
Member

@PeterVoskuilen - Are you saying you resolved by changing line 13 to:

public ?int $displayColorRGB;?

@aidan-casey aidan-casey added the needs info Needs more information. label Jul 7, 2022
@Rodeveer
Copy link

@aidan-casey I've also encountered this problem
The value can be null from autotask. I've changed it to that and that should be the solution.
I'll try to make a PR this evening and will assign you to it for check-up!

@tux2442
Copy link

tux2442 commented Feb 22, 2023

#80 should fix this bug.

@NfickettAIS
Copy link

@PeterVoskuilen - Are you saying you resolved by changing line 13 to:

public ?int $displayColorRGB;?

This is how I was able to resolve the issue on my end, with that specific field, and others. Is there, by chance, any plans on implementing more "null" handling? I have had to make changes to 9 or so models to resolve an error caused by receiving null from Autotask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Needs more information.
Projects
None yet
Development

No branches or pull requests

5 participants