1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-02 18:47:44 +01:00

[PM-6201] Fix creation of organizations no longer working after merging #5130 (#5142)

This commit is contained in:
Jonas Hendrickx 2024-12-11 14:56:46 +01:00 committed by GitHub
parent 09db6c79cb
commit 64573d01a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

View File

@ -10,4 +10,6 @@ public class OrganizationsModel : PagedModel<Organization>
public bool? Paid { get; set; } public bool? Paid { get; set; }
public string Action { get; set; } public string Action { get; set; }
public bool SelfHosted { get; set; } public bool SelfHosted { get; set; }
public double StorageGB(Organization org) => org.Storage.HasValue ? Math.Round(org.Storage.Value / 1073741824D, 2) : 0;
} }

View File

@ -81,8 +81,7 @@
<i class="fa fa-smile-o fa-lg fa-fw text-body-secondary" title="Freeloader"></i> <i class="fa fa-smile-o fa-lg fa-fw text-body-secondary" title="Freeloader"></i>
} }
} }
<i class="fa fa-hdd-o fa-lg fa-fw" <i class="fa fa-hdd-o fa-lg fa-fw" title="Used Storage, @Model.StorageGB(org) GB"></i>
title="Used Storage, @org.StorageGb GB"></i>
@if(org.Enabled) @if(org.Enabled)
{ {
<i class="fa fa-check-circle fa-lg fa-fw" <i class="fa fa-check-circle fa-lg fa-fw"

View File

@ -181,11 +181,6 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable,
public bool IsExpired() => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow; public bool IsExpired() => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow;
/// <summary>
/// Used storage in gigabytes.
/// </summary>
public double StorageGb => Storage.HasValue ? Math.Round(Storage.Value / 1073741824D, 2) : 0;
public long StorageBytesRemaining() public long StorageBytesRemaining()
{ {
if (!MaxStorageGb.HasValue) if (!MaxStorageGb.HasValue)