Remove positional arguments#1
Open
hamiltonj-troubleshooting wants to merge 1 commit into
Open
Conversation
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.
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. |
|
Please merge this pull request so it gets updated in PSGallery. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.