Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #353 opened Nov 04, 2014 by Őry Máté@orymate 
  • Report abuse
  • New issue
Report abuse New issue

Hosts without an instance dont show up at Vlan detail

  • Kálmán Viktor @kviktor commented Nov 04, 2014
    Owner
    diff --git a/circle/network/views.py b/circle/network/views.py
    index 26f6d76..081d458 100644
    --- a/circle/network/views.py
    +++ b/circle/network/views.py
    @@ -656,9 +656,7 @@ class VlanDetail(LoginRequiredMixin, SuperuserRequiredMixin,
         def get_context_data(self, **kwargs):
             context = super(VlanDetail, self).get_context_data(**kwargs)
    
    -        q = Host.objects.filter(interface__in=Interface.objects.filter(
    -            vlan=self.object
    -        ))
    +        q = Host.objects.filter(vlan=self.object)
    
             context['host_list'] = SmallHostTable(q)
             context['vlan_vid'] = self.kwargs.get('vid')
    ```diff diff --git a/circle/network/views.py b/circle/network/views.py index 26f6d76..081d458 100644 --- a/circle/network/views.py +++ b/circle/network/views.py @@ -656,9 +656,7 @@ class VlanDetail(LoginRequiredMixin, SuperuserRequiredMixin, def get_context_data(self, **kwargs): context = super(VlanDetail, self).get_context_data(**kwargs) - q = Host.objects.filter(interface__in=Interface.objects.filter( - vlan=self.object - )) + q = Host.objects.filter(vlan=self.object) context['host_list'] = SmallHostTable(q) context['vlan_vid'] = self.kwargs.get('vid') ```
  • Őry Máté @orymate commented Nov 04, 2014
    Owner

    self.object.host_set

    `self.object.host_set`
  • Őry Máté @orymate

    mentioned in merge request !270 (merged)

    Nov 06, 2014

    mentioned in merge request !270 (merged)

    mentioned in merge request !270
    Toggle commit list
  • Őry Máté @orymate

    Status changed to closed by commit fa1d82

    Nov 06, 2014

    Status changed to closed by commit fa1d82

    Status changed to closed by commit fa1d82
    Toggle commit list
  • Őry Máté @orymate

    mentioned in commit a146d824

    Feb 23, 2015

    mentioned in commit a146d824

    mentioned in commit a146d824f37036c7490cbfedae6f88193f535019
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: circle/cloud#353