mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 12:10:42 -06:00
Fix display bug for attachments
This commit is contained in:
parent
1cfe4f40ba
commit
e169754693
@ -104,7 +104,7 @@ class Attachment extends Model
|
||||
*/
|
||||
public function getDescriptionAttribute($value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_null($value) || strlen($value) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ class Attachment extends Model
|
||||
*/
|
||||
public function getFilenameAttribute($value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_null($value) || strlen($value) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ class Attachment extends Model
|
||||
*/
|
||||
public function getMimeAttribute($value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_null($value) || strlen($value) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ class Attachment extends Model
|
||||
*/
|
||||
public function getNotesAttribute($value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_null($value) || strlen($value) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ class Attachment extends Model
|
||||
*/
|
||||
public function getTitleAttribute($value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
if (is_null($value) || strlen($value) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@
|
||||
<td>
|
||||
<i class="fa {{ att.mime|mimeIcon }}"></i>
|
||||
<a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}">
|
||||
{% if att.title|length > 0 %}
|
||||
{% if att.title %}
|
||||
{{ att.title }}
|
||||
{% else %}
|
||||
{{ att.filename }}
|
||||
|
Loading…
Reference in New Issue
Block a user