Skip to content

SPACEDF-21727: [SpaceDF] - [BE] Add APIDevice model for non-LoRa devices - #150

Open
ngovinh2k2 wants to merge 5 commits into
devfrom
feat/spacedf-21727-be-add-apidevice-model-for-non-lora-devices
Open

SPACEDF-21727: [SpaceDF] - [BE] Add APIDevice model for non-LoRa devices#150
ngovinh2k2 wants to merge 5 commits into
devfrom
feat/spacedf-21727-be-add-apidevice-model-for-non-lora-devices

Conversation

@ngovinh2k2

Copy link
Copy Markdown
Member

What?

Add APIDevice model for non-LoRa devices

Why?

How?

Testing?

  • Functional Testing
  • Security
  • Performance
  • Error Handling
  • Code Quality
  • Documentation
  • Database
  • Deployment
  • Final Review

Anything Else?

@df-redmine

df-redmine Bot commented Aug 25, 2026

Copy link
Copy Markdown

Linked Redmine issue: https://redmine.digitalfortress.dev/issues/21727
Branch: feat/spacedf-21727-be-add-apidevice-model-for-non-lora-devices

Comment thread apps/device/models.py Outdated
Comment thread apps/device/services/nested_device_handlers.py Outdated
Comment thread apps/device/serializers.py Outdated
Comment thread apps/device/serializers.py Outdated
Comment on lines +223 to +226
for handler in handlers:
handler.create(device, nested_data.get(handler.relation))
if nested_data.get(handler.relation):
logger.info(f"{handler.label} created for device {device.id}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can improve by not getting handlers list

handlers = get_nested_device_handlers()
device_objs = []
lorawan_objs = []
nested_objs = {relation: [] for relation in handlers}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nested_objs. rename for better readability too anh. something like e.g. related_objs_by_relation, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants