Skip to content
Discussion options

You must be logged in to vote

A device can have multiple services associated with it, so you presumably want to check for any service named ssh. You could do something like this:

{% if object.services.filter(name='ssh').exists() %}

That will return True if there's a service named ssh associated with the device.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@brunodangelos
Comment options

@jeremystretch
Comment options

@brunodangelos
Comment options

Answer selected by brunodangelos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants