Skip to content

Remove positional arguments#1

Open
hamiltonj-troubleshooting wants to merge 1 commit into
whistler-consulting:masterfrom
hamiltonj-troubleshooting:patch-1
Open

Remove positional arguments#1
hamiltonj-troubleshooting wants to merge 1 commit into
whistler-consulting:masterfrom
hamiltonj-troubleshooting:patch-1

Conversation

@hamiltonj-troubleshooting

Copy link
Copy Markdown

Was trying to utilize this module when I kept running into a issue with the returned values for dates just returning "2". By using show-object I was able to determine the REST call was getting a good response back. After seeing that the dates were actually being returned I realized the "2" that was coming back at the end was due to the positional argument being used.

Tested by removing the [0] for shipDate, warstart, and wed on lines 167-169.

Was trying to utilize this module when I kept running into a issue with the returned values for dates just returning "2". By using show-object I was able to determine the REST call was getting a good response back. After seeing that the dates were actually being returned I realized the "2" that was coming back at the end was due to the positional argument being used. 

Tested by removing the [0] for shipDate, warstart, and wed on lines 167-169.
@hamiltonj-troubleshooting

Copy link
Copy Markdown
Author

After making the proposed changes locally and playing with it some more found the reason the original code had been using positional arguments to select the date. Not sure why at the moment but it looks like depending on wither using the serial or mycomputer parameter the returned values for warrantystart,wed can either be a single string or a array of 2 items. May be a way to detect the potential type of the item at those points and use selectors as needed.

@wrbeaudo

wrbeaudo commented May 3, 2019

Copy link
Copy Markdown

Please merge this pull request so it gets updated in PSGallery.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants