mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 17:55:44 +01:00
feat: add ty type checking support and fix type issues
- Add ty.toml configuration with Django project root - Add py.typed marker for type checking - Fix type issues across codebase: - Add type ignore comments for redis.exceptions imports - Fix django.db.models.functions imports in utils - Fix getattr usage in accounts/forms - Remove unnecessary type annotations in dashboard/forms - Configure ty to exclude migrations and respect ignore files - All ty checks now pass (29 diagnostics -> 0)
This commit is contained in:
@@ -49,7 +49,9 @@ class DataSourceAdmin(admin.ModelAdmin):
|
||||
@admin.display(description="External Data Status")
|
||||
def get_external_data_status(self, obj):
|
||||
if obj.external_source:
|
||||
return f"Last synced: {obj.external_source.last_synced or 'Never'} | Status: {obj.external_source.get_status()}"
|
||||
last_sync = obj.external_source.last_synced or "Never"
|
||||
status = obj.external_source.get_status()
|
||||
return f"Last synced: {last_sync} | Status: {status}"
|
||||
return "No external data source linked"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user