(self, session)
| 483 | # TODO why is this called serialize_public? |
| 484 | # Was supposed to be relation to "public" as privacy setting but isn't clear |
| 485 | def serialize_public(self, session): |
| 486 | |
| 487 | user_primary = None |
| 488 | if self.user_primary: |
| 489 | user_primary = self.user_primary.serialize_username_only() |
| 490 | |
| 491 | return { |
| 492 | 'name': self.name, |
| 493 | 'star_count': self.star_count, |
| 494 | 'images_count': True, # TODO Get right stats... |
| 495 | 'labels_count': True, |
| 496 | 'project_string_id': self.project_string_id, |
| 497 | 'readme': self.readme, |
| 498 | 'user_primary': user_primary, |
| 499 | 'is_public': self.is_public, |
| 500 | 'directory_list': self.get_with_cache( |
| 501 | cache_key = 'directory_list', |
| 502 | cache_miss_function = self.regenerate_directory_list_cache, |
| 503 | session = session), |
| 504 | 'api_billing_enabled': self.api_billing_enabled # TODO review this |
| 505 | } |
| 506 | |
| 507 | def get_global_attributes(self, session, schema_id = None): |
| 508 |
nothing calls this directly
no test coverage detected