-
Notifications
You must be signed in to change notification settings - Fork 2
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
filter
option is not handled properly for create/update
#129
Comments
From what we can tell, we never actually use |
Yeah, I don't think filters matter now since create and update only return a single object as a result (besides anything for Does the test already exist in the codebase or are we considering adding it? |
We were gonna add it. We've sort of re-thought this. You're right, in the sense that using a "filter" when creating/updating a single object doesn't make sense. However, our use-case involves sending a query parameter over with the update so that the response has the right information. Basically, the presentation of an object is relevant to a date, which product wants to always be today according to the timezone of the user's browser. We are able to get around this by using the Either way, I think we should either make handling filters do something useful (rather than translating it to "[object Object]") or just ignore the option if doing a create/update. What do you think? |
Can you provide the example request and response? It sounds like perhaps the required parameter should be part of the model attributes? However, if we think it is not relevant to put the parameter in the attributes, I think the |
Yeah, we've used I guess for this use case, it seems that for create/update either It also may make sense to make it part of the model attributes. It's used as a query param for the EDIT: For some backstory, the thing we're dealing with here is what we're calling a The thing about the BudgetEstimate is we need to know from what day we're estimating. Essentially, the same day could have actuals (time entries/expenses) and planned (SADs/Allocations), so we have to decide a cut-off point where we look at all line items effective before that date and all planned hours from that date and after. That is why we must supply an effective date for a BudgetEstimate. That's probably more backstory than is needed for this issue, and it just happens that we ran across this behavior in |
Okay, I think the way to tackle this issue is to throw when create / update has some |
It seems like the handling of the
filter
option insync
is incorrect. Here's a failing testThe output:
PR incoming
The text was updated successfully, but these errors were encountered: