Skip to content

Commit

Permalink
Merge pull request #324 from fasrc/cp_minor_improvements
Browse files Browse the repository at this point in the history
minor improvements
  • Loading branch information
claire-peters committed Aug 21, 2024
2 parents 4f6be66 + 364f7b2 commit bf86ede
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def handle(self, *args, **options):
defaults={'value': default_value}
)

quantity_label = "Quantity in TB"
quantity_label = "TB"
if default_value == 20:
quantity_label += " in 20T increments"

Expand Down
2 changes: 1 addition & 1 deletion coldfront/plugins/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Meta:

class AllocationRequestSerializer(serializers.ModelSerializer):
project = serializers.SlugRelatedField(slug_field='title', read_only=True)
resource = serializers.SlugRelatedField(slug_field='name', read_only=True)
resource = serializers.ReadOnlyField(source='get_resources_as_string', read_only=True)
status = serializers.SlugRelatedField(slug_field='name', read_only=True)
fulfilled_date = serializers.DateTimeField(read_only=True)
created_by = serializers.SerializerMethodField(read_only=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ def handle(self, *args, **options):
try:
volume = [v for v in volumes if v['name'] == resource_name][0]
except:
logger.error('resource not found in starfish: %s', resource)
logger.debug('resource not found in starfish: %s', resource)
continue
update_resource_attr_types_from_dict(resource, volume['attrs'])
4 changes: 2 additions & 2 deletions coldfront/plugins/fasrc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def _standardize_nesefile(self):
translator = dict((
kv.split('=') for kv in (l.strip('\n') for l in groupkey_file)
))
headers_df = pd.read_csv(header_file, header=0, delim_whitespace=True)
headers_df = pd.read_csv(header_file, header=0, sep='\s+')
headers = headers_df.columns.values.tolist()
data = pd.read_csv(datafile, names=headers, delim_whitespace=True)
data = pd.read_csv(datafile, names=headers, sep='\s+')
data = data.loc[data['pool'].str.contains('1')]
data['lab'] = data['pool'].str.replace('1', '').str.replace('hugl', '').str.replace('hus3', '')
data['server'] = 'nesetape'
Expand Down
1 change: 1 addition & 0 deletions coldfront/plugins/ldap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ def identify_ad_group(sender, **kwargs):
ad_conn = LDAPConn()
members, manager = ad_conn.return_group_members_manager(project_title)
except Exception as e:
logger.exception(e)
raise ValueError(f"ldap connection error: {e}")
try:
ifx_pi = get_user_model().objects.get(username=manager['sAMAccountName'][0])
Expand Down
1 change: 1 addition & 0 deletions coldfront/plugins/sftocf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ def allocations(self):
status__name__in=allocation_statuses,
resources__in=self.connection_obj.get_corresponding_coldfront_resources()
)
return self._allocations

@property
def allocationquerymatches(self):
Expand Down

0 comments on commit bf86ede

Please sign in to comment.