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

Adding custom schemas to users #39

Closed
cooper opened this issue May 2, 2018 · 6 comments
Closed

Adding custom schemas to users #39

cooper opened this issue May 2, 2018 · 6 comments
Assignees
Labels

Comments

@cooper
Copy link

cooper commented May 2, 2018

Nate,

I appreciate how quickly you were able to add the ability to set custom schemas and publish the changes to PowerShell Gallery! I am getting an error when trying to set one, though. I am probably just missing something:

[fesscript]: PS C:\Users\mcooper\Documents> Update-GSUser mcooper -CustomSchemas @{ Frontier_Private_IDs = @{ Employee_Number = 4097 } }
Update-GSUser : Cannot index into a null array.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-GSUser

[fesscript]: PS C:\Users\mcooper\Documents> Update-GSUser mcooper -CustomSchemas @{ Frontier_Private_IDs = @{ Employee_Number = "4097" } }
Update-GSUser : Cannot index into a null array.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-GSUser

[fesscript]: PS C:\Users\mcooper\Documents> Update-GSUser mcooper -CustomSchemas @{ "Frontier Private IDs" = @{ "Employee Number" = "4097" } }
Update-GSUser : Cannot index into a null array.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-GSUser

The schema group is called "Frontier Private IDs" with attributes "Student Number" and "Employee Number." I noticed when querying a user with Get-GSUser, the spaces are replaced with underscores, but I can't get it to work either way.

@scrthq
Copy link
Member

scrthq commented May 2, 2018

Hey @cooper - that error indicates something isn't working as expected on the PowerShell side, not necessarily Google not liking your schema construction.

Testing it out to see if I can replicate locally, working on a fix ASAP for you!

@scrthq scrthq self-assigned this May 2, 2018
@scrthq scrthq added the bug label May 2, 2018
scrthq added a commit that referenced this issue May 3, 2018
@scrthq
Copy link
Member

scrthq commented May 3, 2018

@cooper - found the issue! pushing v2.5.2 now with the fix

@scrthq scrthq closed this as completed in #40 May 3, 2018
scrthq added a commit that referenced this issue May 3, 2018
## 2.5.2
 
* Fixed: `Update-GSUser -CustomSchemas @{schema = @{field = "value"}}` resulting in null array (Resolve [Issue #39](#39))
@scrthq
Copy link
Member

scrthq commented May 3, 2018

lol, spelling is a drag sometimes ¯_(ツ)_/¯

image

@scrthq
Copy link
Member

scrthq commented May 3, 2018

v2.5.2 deployed, try it out! you may have to fiddle with the space vs underscore issue, curious on whether your schema accepts spaces or not (I'm guessing it may convert it to underscores and require that when performing updates to it, tbh)

@cooper
Copy link
Author

cooper commented May 3, 2018

It works using the underscores. You're awesome!

@scrthq
Copy link
Member

scrthq commented May 3, 2018 via email

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

No branches or pull requests

2 participants