# abuse.AbuseReport

## Model Info

| Key | Value |
|---|-----|
| Model Name | AbuseReport |
| Verbose Name | abuse report |
| Verbose Name Plural | abuse reports |
| Docstring | <p>AbuseReport(id, created, modified, reporter, reporter\_email, reporter\_name, country\_code, guid, user, rating, collection, message, client\_id, addon\_name, addon\_summary, addon\_version, addon\_signature, application, application\_version, application\_locale, operating\_system, operating\_system\_version, install\_date, reason, addon\_install\_origin, addon\_install\_method, addon\_install\_source, addon\_install\_source\_url, report\_entry\_point, location, cinder\_job, illegal\_category, illegal\_subcategory)</p> |
| Is Abstract | False |
| Is Proxy | False |
| Is Managed | True |
| Ordering | [] |
| Permissions | [] |
| Default Permissions | ('add', 'change', 'delete', 'view') |
| Indexes | [<Index: fields=['created'] name='abuse_reports_created_idx'>, <Index: fields=['guid'] name='guid_idx'>] |
| Constraints | [<CheckConstraint: check=(OR: (AND: (NOT (AND: ('guid', ''))), ('collection__isnull', True), ('guid__isnull', False), ('rating__isnull', True), ('user__isnull', True)), (AND: ('collection__isnull', True), ('guid__isnull', True), ('rating__isnull', True), ('user__isnull', False)), (AND: ('collection__isnull', True), ('guid__isnull', True), ('rating__isnull', False), ('user__isnull', True)), (AND: ('collection__isnull', False), ('guid__isnull', True), ('rating__isnull', True), ('user__isnull', True))) name='just_one_of_guid_user_rating_collection_must_be_set'>] |
| Database Table | abuse_reports |
| Base Manager | None |
| Default Manager | None |
| File | /data/olympia/src/olympia/abuse/models.py |
| Starting Line Number | 460 |
| Method Resolution Order | (<class 'olympia.abuse.models.AbuseReport'>, <class 'olympia.amo.models.ModelBase'>, <class 'olympia.amo.models.SaveUpdateMixin'>, <class 'django.db.models.base.Model'>, <class 'django.db.models.utils.AltersData'>, <class 'object'>) |

## Fields

| Field Name | Field Type | Database Column | Database Type | Verbose Name |
|----------|----------|---------------|-------------|------------|
| `addon_install_method` | PositiveSmallIntegerField | addon_install_method | smallint UNSIGNED | addon install method |
| `addon_install_origin` | CharField | addon_install_origin | varchar(255) | addon install origin |
| `addon_install_source` | PositiveSmallIntegerField | addon_install_source | smallint UNSIGNED | addon install source |
| `addon_install_source_url` | CharField | addon_install_source_url | varchar(255) | addon install source url |
| `addon_name` | CharField | addon_name | varchar(255) | addon name |
| `addon_signature` | PositiveSmallIntegerField | addon_signature | smallint UNSIGNED | addon signature |
| `addon_summary` | CharField | addon_summary | varchar(255) | addon summary |
| `addon_version` | CharField | addon_version | varchar(255) | addon version |
| `application` | PositiveSmallIntegerField | application | smallint UNSIGNED | application |
| `application_locale` | CharField | application_locale | varchar(255) | application locale |
| `application_version` | CharField | application_version | varchar(255) | application version |
| `cinder_job` | ForeignKey | cinder_job_id | integer | cinder job |
| `cinderappeal` | OneToOneRel |  | integer |  |
| `client_id` | CharField | client_id | varchar(64) | client id |
| `collection` | ForeignKey | collection_id | integer UNSIGNED | collection |
| `country_code` | CharField | country_code | varchar(2) | country code |
| `created` | DateTimeField | created | datetime(6) | created |
| `guid` | CharField | guid | varchar(255) | guid |
| `id (pk)` | AutoField | id | integer AUTO_INCREMENT | ID |
| `illegal_category` | PositiveSmallIntegerField | illegal_category | smallint UNSIGNED | illegal category |
| `illegal_subcategory` | PositiveSmallIntegerField | illegal_subcategory | smallint UNSIGNED | illegal subcategory |
| `install_date` | DateTimeField | install_date | datetime(6) | install date |
| `location` | PositiveSmallIntegerField | location | smallint UNSIGNED | location |
| `message` | TextField | message | longtext | message |
| `modified` | DateTimeField | modified | datetime(6) | modified |
| `operating_system` | CharField | operating_system | varchar(255) | operating system |
| `operating_system_version` | CharField | operating_system_version | varchar(255) | operating system version |
| `rating` | ForeignKey | rating_id | integer UNSIGNED | rating |
| `reason` | PositiveSmallIntegerField | reason | smallint UNSIGNED | reason |
| `report_entry_point` | PositiveSmallIntegerField | report_entry_point | smallint UNSIGNED | report entry point |
| `reporter` | ForeignKey | reporter_id | integer | reporter |
| `reporter_email` | CharField | reporter_email | varchar(255) | reporter email |
| `reporter_name` | CharField | reporter_name | varchar(255) | reporter name |
| `user` | ForeignKey | user_id | integer | user |

## Relations

| Field Name | Field Type | Database Column | Database Type | Related Model | Related Name |
|----------|----------|---------------|-------------|-------------|------------|
| `cinder_job` | ForeignKey | cinder_job_id | integer | abuse.CinderJob | abusereport_set |
| `collection` | ForeignKey | collection_id | integer UNSIGNED | bandwagon.Collection | abuse_reports |
| `rating` | ForeignKey | rating_id | integer UNSIGNED | ratings.Rating | abuse_reports |
| `reporter` | ForeignKey | reporter_id | integer | users.UserProfile | abuse_reported |
| `user` | ForeignKey | user_id | integer | users.UserProfile | abuse_reports |

fields_reverse_relation=[FieldReverseRelation(name='abusereport_set', field_type='OneToOneRel', field_db_type='integer', related_model='abuse.CinderAppeal', field_name_on_related_model='reporter_report', field_type_on_related_model='OneToOneField')]

## Reverse Relations

| Field Name | Field Type | Database Type | Related Model | Field Name on Related Model | Field Type on Related Model |
|----------|----------|-------------|-------------|---------------------------|---------------------------|
| `abusereport_set` | OneToOneRel | integer | abuse.CinderAppeal | reporter_report | OneToOneField |

## Methods

### Other Methods

| Method Name | Signature |
|-----------|---------|
| `get_addon_install_method_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: addon_install_method>)` |
| `get_addon_install_source_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: addon_install_source>)` |
| `get_addon_signature_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: addon_signature>)` |
| `get_admin_absolute_url` | `(self)` |
| `get_admin_url_path` | `(self)` |
| `get_application_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: application>)` |
| `get_illegal_category_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: illegal_category>)` |
| `get_illegal_subcategory_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: illegal_subcategory>)` |
| `get_location_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: location>)` |
| `get_next_by_created` | `(self, *, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)` |
| `get_next_by_modified` | `(self, *, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)` |
| `get_previous_by_created` | `(self, *, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)` |
| `get_previous_by_modified` | `(self, *, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)` |
| `get_reason_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: reason>)` |
| `get_report_entry_point_display` | `(self, *, field=<django.db.models.fields.PositiveSmallIntegerField: report_entry_point>)` |
| `get_unfiltered_manager` | `()` |
| `reload` | `(self)` |
| `serializable_reference` | `(self)` |
| `update` | `(self, **kw)` |


### Private Methods

| Method Name | Signature |
|-----------|---------|
| `_get_field_value_map` | `(self, meta, exclude=None)` |


## Custom Managers

### default

**Class:** `AbuseReportManager`

*Base for all managers in AMO.

Returns BaseQuerySets.

If a model has translated fields, they'll be attached through a transform
function.*

#### Custom Methods

##### `for_addon(self, addon)`


##### `transform(self, fn)`


#### Custom QuerySet

**Class:** `AbuseReportQuerySet`

*Represent a lazy database lookup for a set of objects.*

##### Custom Methods

###### `for_addon(self, addon)`

###### `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:** `AbuseReportManager`

*Base for all managers in AMO.

Returns BaseQuerySets.

If a model has translated fields, they'll be attached through a transform
function.*

#### Custom Methods

##### `for_addon(self, addon)`


##### `transform(self, fn)`


#### Custom QuerySet

**Class:** `AbuseReportQuerySet`

*Represent a lazy database lookup for a set of objects.*

##### Custom Methods

###### `for_addon(self, addon)`

###### `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-08-05 !!!