Skip to content
This repository was archived by the owner on Jan 8, 2021. It is now read-only.

Asset Tags having leading whitespaces #123

Open
Haeki opened this issue Jun 23, 2020 · 0 comments
Open

Asset Tags having leading whitespaces #123

Haeki opened this issue Jun 23, 2020 · 0 comments

Comments

@Haeki
Copy link

Haeki commented Jun 23, 2020

Environment

  • Python version: 3.6
  • NetBox version: 2.8.4
  • vCenter version: 6.7
  • vCenter NetBox Sync version: latest develop branch

Related Bug

" none" causes problems as asset_tag #103

Recently he same happen with " to be filled by o.e.m." having a leading whitespace.

Solution

Instead of again adding a second String with a white space in front to the banned_tags list, I would just strip leading whitespaces before comparing.

I used the Python strip() method and remove the already added " none" from the list.
Strip whitespaces when checking if asset tag is banned #122

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant