misc: do not include file contents in json export if file is not set (#89876)
gitea/wcs/pipeline/head This commit looks good
Details
gitea/wcs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
22f8886b9d
commit
0fcf440e0a
|
@ -418,7 +418,7 @@ class AttachmentEvolutionPart(EvolutionPart):
|
|||
return os.path.join(get_publisher().app_dir, self.filename)
|
||||
|
||||
def get_file_pointer(self):
|
||||
if self.filename.startswith('uuid-'):
|
||||
if not self.filename or self.filename.startswith('uuid-'):
|
||||
return None
|
||||
return open(self.get_file_path(), 'rb') # pylint: disable=consider-using-with
|
||||
|
||||
|
|
Loading…
Reference in New Issue