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

patch modified_attributes_only prevent attributes from being sent #155

Open
fcosantos opened this issue Aug 4, 2023 · 1 comment
Open

Comments

@fcosantos
Copy link
Contributor

fcosantos commented Aug 4, 2023

if the object has been created locally instead of retrieved:

https://github.com/VirusTotal/vt-py/blob/master/vt/client.py#L586C33-L586C57

example:
image
rules attribute will not be uploaded.

@plusvic
Copy link
Member

plusvic commented Sep 9, 2023

I tool at look at this, and there's no way to do fix it in a way that makes sense for the API user. Instead you could simply do this:

with vt.Client(...) as client:
   id = '11111111'
  ruleset = vt.Object('hunting_ruleset', obj_id=id)
  ruleset.rules = 'eso'
  client.patch(...)

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

No branches or pull requests

2 participants