Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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(...)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants