Questions tagged [depends]
69 questions
3
votes
1 answer
Why can't see all task when use 'tasks' task in Gradle?
task startSession << {
chant()
}
def chant() {
ant.echo(message: 'Repeat after me...')
}
3.times {
task "yayGradle$it" << {
println 'Gradle rocks'
}
}
yayGradle0.dependsOn startSession
yayGradle2.dependsOn yayGradle1, yayGradle0
task…

Xelian
- 16,680
- 25
- 99
- 152
3
votes
2 answers
Conditional remote validation
I have a form which I am validating through the jQuery Validate plugin. Everything is working fine except just one thing.
I have a field that I using, the remote rule, and I am using AJAX to check if there is already an application record with the…

Neel
- 613
- 4
- 14
- 32
2
votes
0 answers
Depends efficiency in FastAPI
If you are application depends on some objects that needs to be initialized at startup, what's the point of using Depends mechanism to pass them to every route rather than create a global dict at startup?
If the goal of the Depends strategy is to…

Antonio Santoro
- 827
- 1
- 11
- 29
2
votes
2 answers
FastAPI: can I use Depends() for parameters in a POST, too?
Overview
I have created a class-based dependency, similar to what is in the amazing FastAPI tutorial.
Problem
It works, except that the parameters in the dependency (the Depends() portion) are passed as query parameters, meaning that they are part…

Mike Williamson
- 4,915
- 14
- 67
- 104
2
votes
1 answer
How to compute multiple levels in python Odoo
What's wrong with my code ?
Requested:
If A annd B are 0 show me result = A
If A and B are not 0 then continue
If C ID is 1 Do the equation
Else if it's another ID then show me result = A
Else of all just show A
What i currently…

Bilal Shehab
- 21
- 5
2
votes
2 answers
Yii2 location from dependencies in custom asset
I have a path something like /actions/users/someaction in the frontend and I want to use the Bootstrap-Asset (located in /backend/web/assets/xxxxxx/) from the backend.
So I created an asset called "ActionAsset" with following content:
class…

SlazZe
- 27
- 4
2
votes
1 answer
While using testng depends on method the method is skipped when the base method execution fails
I have a unique requirement where the method2 is dependent on method1.
In method1, I am trying to generate some of the order data like placing the orders and storing the objects associated to order placement in a list of objects,
and the list…

user3172630
- 61
- 2
1
vote
1 answer
DLLRegisterServer failed
I was trying to re-register .ocx file that is included in my project. I got this error message:
DllRegisterServer in XXXX.ocx failed.
Return code 0x8007007e.
I have run depends.exe and nothing seems wrong with the dependency. I only saw question…

blenzcoffee
- 851
- 1
- 11
- 35
1
vote
1 answer
"AttributeError: 'property' object has no attribute 'get'" when using Depends in FastAPI
To implement authentication for a FastAPI endpoint, I want to make use of the Depends functionality offered in the latest versions (>=0.95) of FastAPI. I have tried several ways to implement it but I am facing an error "AttributeError: 'property'…

Laurens Fleuren
- 13
- 3
1
vote
1 answer
Secured endpoints in FastApi using enum
In my app, I want to apply access to a given endpoint based on a role, which is an enum.
The way it all works is that a logged in (authorized) user, wants to get access to some resources, or create a new user etc..., then his jwt token is decoded,…

janluk
- 33
- 3
1
vote
1 answer
Why does FastAPI's Depends() work without any parameter passed to it?
I found the following FastAPI code for authenticating a user with their information gotten from a form:
@app.post("/token")
async def login_for_access_token(form_data:OAuth2PasswordRequestForm = Depends(),
db:…

pablowilks2
- 299
- 5
- 15
1
vote
1 answer
Fastapi - need to use both Body and Depends as default value
I have an endpoint in in which the main body parameter was defined as follows:
@router.post("/myendpoint")
async def delete_objectss(param: DeleteItemParams = DeleteItemParamsMetadata,
.....)
Reason behind this is that I…

Fabri Ba
- 119
- 9
1
vote
0 answers
Using Oauth2 with scope, error - "Depends" has no attribute "query" - FastAPI
authentication.py
from datetime import datetime, timedelta
from fastapi import Depends , HTTPException, status, Security
from fastapi.security import OAuth2PasswordBearer, SecurityScopes
from jose import JWTError, jwt
from auth.schemas import…

Raj Mane
- 11
- 2
1
vote
1 answer
jQuery validation depends
Is it possible to add a depends onto an equalTo rule?
i.e.,
rule {
myFormFierld: if textbox name has been filled out add this equalTo rule..
}

Neil Bradley
- 11
- 2
1
vote
1 answer
Chef Workflow fails on Verify stage when cookbook has dependencies
I am using the Workflow portion of Chef Automate to deliver cookbooks to my Chef Server. I have successfully uploaded 2 cookbooks on the Chef Server through the pipeline.
On the Chef Server:
apache is at version 0.2.3
another_test is at version…

James
- 11
- 3