diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/editor/media/RetryFailedMediaUploadUseCase.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/editor/media/RetryFailedMediaUploadUseCase.kt index 69373ee95e8d..d3edb6ff9269 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/editor/media/RetryFailedMediaUploadUseCase.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/editor/media/RetryFailedMediaUploadUseCase.kt @@ -38,7 +38,8 @@ class RetryFailedMediaUploadUseCase @Inject constructor( editorMediaListener, mediaModels ) - val site: SiteModel? = siteStore.getSiteByLocalId(editorMediaListener.getImmutablePost().localSiteId) + val siteId = editorMediaListener.getImmutablePost().localSiteId + val site: SiteModel? = siteStore.getSiteByLocalId(siteId) AnalyticsUtils.trackWithSiteDetails(tracker, Stat.EDITOR_UPLOAD_MEDIA_RETRIED, site, null); } }