# reviewers.AutoApprovalSummary
## Model Info
| Key | Value |
|---|-----|
| Model Name | AutoApprovalSummary |
| Verbose Name | auto approval summary |
| Verbose Name Plural | auto approval summarys |
| Docstring |
Model holding the results of an auto-approval attempt on a Version.
|
| Is Abstract | False |
| Is Proxy | False |
| Is Managed | True |
| Ordering | [] |
| Permissions | [] |
| Default Permissions | ('add', 'change', 'delete', 'view') |
| Indexes | [] |
| Constraints | [] |
| Database Table | editors_autoapprovalsummary |
| Base Manager | None |
| Default Manager | None |
| File | /data/olympia/src/olympia/reviewers/models.py |
| Starting Line Number | 224 |
| Method Resolution Order | (, , , , , ) |
## Fields
| Field Name | Field Type | Database Column | Database Type | Verbose Name |
|----------|----------|---------------|-------------|------------|
| `code_weight` | IntegerField | code_weight | integer | code weight |
| `confirmed` | BooleanField | confirmed | bool | confirmed |
| `created` | DateTimeField | created | datetime(6) | created |
| `has_auto_approval_disabled` | BooleanField | has_auto_approval_disabled | bool | has auto approval disabled |
| `is_blocked` | BooleanField | is_blocked | bool | is blocked |
| `is_locked` | BooleanField | is_locked | bool | is locked |
| `is_pending_rejection` | BooleanField | is_pending_rejection | bool | is pending rejection |
| `is_promoted_prereview` | BooleanField | is_promoted_prereview | bool | is promoted prereview |
| `metadata_weight` | IntegerField | metadata_weight | integer | metadata weight |
| `modified` | DateTimeField | modified | datetime(6) | modified |
| `should_be_delayed` | BooleanField | should_be_delayed | bool | should be delayed |
| `verdict` | PositiveSmallIntegerField | verdict | smallint UNSIGNED | verdict |
| `version (pk)` | OneToOneField | version_id | integer UNSIGNED | version |
| `weight` | IntegerField | weight | integer | weight |
| `weight_info` | JSONField | weight_info | json | weight info |
## Relations
| Field Name | Field Type | Database Column | Database Type | Related Model | Related Name |
|----------|----------|---------------|-------------|-------------|------------|
| `version (pk)` | OneToOneField | version_id | integer UNSIGNED | versions.Version | autoapprovalsummary_set |
fields_reverse_relation=[]
## Methods
### Other Methods
| Method Name | Signature |
|-----------|---------|
| `calculate_code_weight_factors` | `(self)` |
| `calculate_metadata_weight_factors` | `(self)` |
| `calculate_size_of_code_changes` | `(self)` |
| `calculate_verdict` | `(self, dry_run=False, pretty=False)` |
| `calculate_weight` | `(self)` |
| `check_has_auto_approval_disabled` | `(version)` |
| `check_is_blocked` | `(version)` |
| `check_is_locked` | `(version)` |
| `check_is_pending_rejection` | `(version)` |
| `check_is_promoted_prereview` | `(version)` |
| `check_should_be_delayed` | `(version)` |
| `check_uses_native_messaging` | `(version)` |
| `count_uses_custom_csp` | `(version)` |
| `count_uses_eval_or_document_write` | `(version)` |
| `count_uses_implied_eval` | `(version)` |
| `count_uses_innerhtml` | `(version)` |
| `count_uses_remote_scripts` | `(version)` |
| `count_uses_unknown_minified_code` | `(version)` |
| `count_uses_uses_coinminer` | `(version)` |
| `count_violates_mozilla_conditions` | `(version)` |
| `create_summary_for_version` | `(version, dry_run=False)` |
| `find_previous_confirmed_version` | `(self)` |
| `get_admin_absolute_url` | `(self)` |
| `get_admin_url_path` | `(self)` |
| `get_next_by_created` | `(self, *, field=, is_next=True, **kwargs)` |
| `get_next_by_modified` | `(self, *, field=, is_next=True, **kwargs)` |
| `get_pretty_weight_info` | `(self)` |
| `get_previous_by_created` | `(self, *, field=, is_next=False, **kwargs)` |
| `get_previous_by_modified` | `(self, *, field=, is_next=False, **kwargs)` |
| `get_unfiltered_manager` | `()` |
| `get_verdict_display` | `(self, *, field=)` |
| `reload` | `(self)` |
| `serializable_reference` | `(self)` |
| `update` | `(self, **kw)` |
| `verdict_info_prettifier` | `(verdict_info)` |
### Private Methods
| Method Name | Signature |
|-----------|---------|
| `_count_linter_flag` | `(version, flag)` |
| `_count_metadata_property` | `(version, prop)` |
| `_get_field_value_map` | `(self, meta, exclude=None)` |
## Custom Managers
### default
**Class:** `ManagerBase`
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they'll be attached through a transform
function.*
#### Custom Methods
##### `transform(self, fn)`
#### Custom QuerySet
**Class:** `BaseQuerySet`
*Represent a lazy database lookup for a set of objects.*
##### Custom Methods
###### `get_with_primary_fallback(self, *args, **kwargs)`
*Like get(), but if using a non-default database and DoesNotExist is
raised, another attempt is made using the default database instead.
Intended to be used in places where replication lag could cause the
object not to exist for a brief moment and forcing use of primary db at
all times is undesirable.*
###### `no_transforms(self)`
###### `only_translations(self)`
*Remove all transforms except translations.*
###### `optimized_count(self)`
*Slightly optimized count() for cases where there is a DISTINCT in the
queryset.
When a count() call is made on a queryset that has a distinct, that
causes django to run the full SELECT (including all fields, distinct,
ordering etc) in a subquery and then COUNT() on the result of that
subquery, which is costly/innefficient. That's tracked in
https://code.djangoproject.com/ticket/30685.
We can't easily fix the fact that there is a subquery, but we can
avoid selecting all fields and ordering in that subquery needlessly.*
###### `pop_transforms(self)`
###### `transform(self, fn)`
### objects
**Class:** `ManagerBase`
*Base for all managers in AMO.
Returns BaseQuerySets.
If a model has translated fields, they'll be attached through a transform
function.*
#### Custom Methods
##### `transform(self, fn)`
#### Custom QuerySet
**Class:** `BaseQuerySet`
*Represent a lazy database lookup for a set of objects.*
##### Custom Methods
###### `get_with_primary_fallback(self, *args, **kwargs)`
*Like get(), but if using a non-default database and DoesNotExist is
raised, another attempt is made using the default database instead.
Intended to be used in places where replication lag could cause the
object not to exist for a brief moment and forcing use of primary db at
all times is undesirable.*
###### `no_transforms(self)`
###### `only_translations(self)`
*Remove all transforms except translations.*
###### `optimized_count(self)`
*Slightly optimized count() for cases where there is a DISTINCT in the
queryset.
When a count() call is made on a queryset that has a distinct, that
causes django to run the full SELECT (including all fields, distinct,
ordering etc) in a subquery and then COUNT() on the result of that
subquery, which is costly/innefficient. That's tracked in
https://code.djangoproject.com/ticket/30685.
We can't easily fix the fact that there is a subquery, but we can
avoid selecting all fields and ordering in that subquery needlessly.*
###### `pop_transforms(self)`
###### `transform(self, fn)`
---
!!! THIS DOCUMENT WAS *AUTOGENERATED* ON 2025-12-13 !!!