Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make camera_type optional for onvif schema #982

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions care/facility/migrations/0309_auto_20220818_1949.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 2.2.11 on 2022-08-18 14:19

import care.utils.models.validators
import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('facility', '0308_auto_20220805_2247'),
]

operations = [
migrations.AlterField(
model_name='asset',
name='meta',
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, validators=[care.utils.models.validators.JSONFieldSchemaValidator({'$schema': 'http://json-schema.org/draft-07/schema#', 'anyOf': [{'$ref': '#/definitions/onvif'}, {'$ref': '#/definitions/hl7monitor'}, {'$ref': '#/definitions/empty'}], 'definitions': {'empty': {'additionalProperties': False, 'type': 'object'}, 'hl7monitor': {'additionalProperties': False, 'properties': {'asset_type': {'type': 'string'}, 'insecure_connection': {'type': 'boolean'}, 'local_ip_address': {'type': 'string'}, 'middleware_hostname': {'type': 'string'}}, 'required': ['local_ip_address', 'middleware_hostname'], 'type': 'object'}, 'onvif': {'additionalProperties': False, 'properties': {'asset_type': {'type': 'string'}, 'camera_access_key': {'type': 'string'}, 'camera_type': {'type': 'string'}, 'insecure_connection': {'type': 'boolean'}, 'local_ip_address': {'type': 'string'}, 'middleware_hostname': {'type': 'string'}}, 'required': ['local_ip_address', 'middleware_hostname', 'camera_access_key'], 'type': 'object'}}})]),
),
]
1 change: 0 additions & 1 deletion care/facility/models/json_schema/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"local_ip_address",
"middleware_hostname",
"camera_access_key",
"camera_type",
],
"properties": {
"local_ip_address": {"type": "string"},
Expand Down