Fix all services.py
This commit is contained in:
		@ -256,7 +256,7 @@ class Services(object):
 | 
			
		||||
                        res_doc["assignees"] = srv_assignees["names"]
 | 
			
		||||
            yield res_doc
 | 
			
		||||
 | 
			
		||||
    def docs_html_by_category(self, environment):
 | 
			
		||||
    def docs_html_by_category(self, environment, cloud_environment):
 | 
			
		||||
        """Generate structure for doc-exports repository"""
 | 
			
		||||
        doc_struct = dict()
 | 
			
		||||
        for srv in self.all_services:
 | 
			
		||||
@ -272,6 +272,13 @@ class Services(object):
 | 
			
		||||
                srv_res["teams"] = [
 | 
			
		||||
                    x for x in srv["teams"] if x["permission"] == "write"
 | 
			
		||||
                ]
 | 
			
		||||
            srv["repositories"] = []
 | 
			
		||||
            for repositories in self.all_repositories:
 | 
			
		||||
                if repositories["service_type"] == srv["service_type"]:
 | 
			
		||||
                    for single_repo in repositories["repositories"]:
 | 
			
		||||
                        if single_repo["cloud_environments"][0] == cloud_environment:
 | 
			
		||||
                            srv["repositories"].append(single_repo)
 | 
			
		||||
 | 
			
		||||
            if "repositories" in srv and environment:
 | 
			
		||||
                internal_exists = False
 | 
			
		||||
                for repo in srv["repositories"]:
 | 
			
		||||
@ -328,5 +335,9 @@ class Services(object):
 | 
			
		||||
        for service in services["services"]:
 | 
			
		||||
            if service["service_type"] == service_type:
 | 
			
		||||
                res["service"] = service
 | 
			
		||||
                for repositories in self.all_repositories:
 | 
			
		||||
                    if repositories["service_type"] == service["service_type"]:
 | 
			
		||||
                        res["service"]["repositories"] = repositories["repositories"]
 | 
			
		||||
                        break
 | 
			
		||||
                break
 | 
			
		||||
        return res
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user