コード例 #1
0
 def most_restrictive_licenses(self, apps_to_check=None):
     from corehq.apps.hqmedia.utils import most_restrictive
     licenses = [
         m.license['type'] for m in self.all_media(from_apps=apps_to_check)
         if m.license
     ]
     return most_restrictive(licenses)
コード例 #2
0
ファイル: models.py プロジェクト: esoergel/commcare-hq
 def most_restrictive_licenses(self, apps_to_check=None):
     from corehq.apps.hqmedia.utils import most_restrictive
     licenses = [m.license['type'] for m in self.all_media(from_apps=apps_to_check) if m.license]
     return most_restrictive(licenses)